From a0bb392d8c745703554680c6afb9d5f87666f84f Mon Sep 17 00:00:00 2001 From: Yuxuan Shui Date: Sat, 21 Sep 2019 05:11:28 +0100 Subject: [PATCH] core: process window updates before recheck_focus recheck_focus rejects focus of unmapped windows, so we have to make sure pending maps of windows are processed before we call recheck_focus. Signed-off-by: Yuxuan Shui --- src/compton.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/compton.c b/src/compton.c index 55963a4..1cbef67 100644 --- a/src/compton.c +++ b/src/compton.c @@ -1333,6 +1333,9 @@ static void handle_pending_updates(EV_P_ struct session *ps) { // Call fill_win on new windows handle_new_windows(ps); + // Process window updates + refresh_windows(ps); + { auto r = xcb_get_input_focus_reply(ps->c, xcb_get_input_focus(ps->c), NULL); if (!ps->active_win || (r && r->focus != ps->active_win->base.id)) { @@ -1341,9 +1344,6 @@ static void handle_pending_updates(EV_P_ struct session *ps) { free(r); } - // Process window updates - refresh_windows(ps); - // Refresh pixmaps and shadows refresh_stale_images(ps);