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 <yshuiv7@gmail.com>
This commit is contained in:
Yuxuan Shui 2019-09-21 05:11:28 +01:00
parent 3e17f11d6d
commit a0bb392d8c
No known key found for this signature in database
GPG Key ID: 37C999F617EA1A47
1 changed files with 3 additions and 3 deletions

View File

@ -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);