From 9d6f429577ec072d3f5212c29760ca70e3c93ce3 Mon Sep 17 00:00:00 2001 From: Vito Caputo Date: Tue, 28 Nov 2017 15:32:26 -0800 Subject: window: discover allscreen on configure too Previously only windows fitting the screen dimensions @ assimilate would become automagically "allscreened". Newer mplayer seems to break this heuristic, so expand the application of the heuristic to include configure requests as well. --- src/xevent.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/xevent.c') diff --git a/src/xevent.c b/src/xevent.c index a14f37e..6d51c61 100644 --- a/src/xevent.c +++ b/src/xevent.c @@ -90,11 +90,13 @@ void vwm_xevent_handle_configure_request(vwm_t *vwm, XConfigureRequestEvent *ev) /* XXX: windows raising themselves is annoying, so discard CWSibling and CWStackMode. */ - if ((xwin = vwm_xwin_lookup(vwm, ev->window)) && - xwin->managed && - xwin->managed->autoconfigured == VWM_WIN_AUTOCONF_ALL) - /* this is to allow auto-allscreen to succeed in getting a borderless window configured */ - change_mask &= ~CWBorderWidth; + if ((xwin = vwm_xwin_lookup(vwm, ev->window)) && xwin->managed) { + if (change_mask & CWWidth && change_mask & CWHeight) + vwm_win_autoconf_magic(vwm, xwin->managed, NULL, ev->x, ev->y, ev->width, ev->height); + + if (xwin->managed->autoconfigured == VWM_WIN_AUTOCONF_ALL) + changes.border_width = 0; + } XConfigureWindow(VWM_XDISPLAY(vwm), ev->window, change_mask, &changes); } -- cgit v1.2.3