From 45e9530bcbff8482f590c916f231c3c94533d1cb Mon Sep 17 00:00:00 2001 From: Yuxuan Shui Date: Thu, 1 Nov 2018 21:05:52 +0000 Subject: [PATCH] Update bounding shape when a window is mapped Fixes #35 Signed-off-by: Yuxuan Shui --- src/compton.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/compton.c b/src/compton.c index e976431..7ac5daa 100644 --- a/src/compton.c +++ b/src/compton.c @@ -2039,6 +2039,12 @@ map_win(session_t *ps, Window id) { if (w->need_configure) configure_win(ps, &w->queue_configure); + // We stopped listening on ShapeNotify events + // when the window is unmapped (XXX we shouldn't), + // so the shape of the window might have changed, + // update. (Issue #35) + win_update_bounding_shape(ps, w); + #ifdef CONFIG_DBUS // Send D-Bus signal if (ps->o.dbus) { @@ -2230,7 +2236,7 @@ configure_win(session_t *ps, xcb_configure_notify_event_t *ce) { if (!w) return; - if (w->a.map_state == IsUnmapped) { + if (w->a.map_state == XCB_MAP_STATE_UNMAPPED) { /* save the configure event for when the window maps */ w->need_configure = true; w->queue_configure = *ce;