summaryrefslogtreecommitdiff
path: root/src/xevent.c
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2017-11-28 15:32:26 -0800
committerVito Caputo <vcaputo@pengaru.com>2017-11-28 15:32:26 -0800
commit9d6f429577ec072d3f5212c29760ca70e3c93ce3 (patch)
tree56e8bb6589abe89759d54abd4a7990fe6cb7b35f /src/xevent.c
parent9bfd0e3319ec99ca6e89b02c060c4305fddbb610 (diff)
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.
Diffstat (limited to 'src/xevent.c')
-rw-r--r--src/xevent.c12
1 files changed, 7 insertions, 5 deletions
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);
}
© All Rights Reserved