core: delay focus updates

Delay focus updates until critical section. Rational is that focus
events might arrive when the focused window hasn't been managed by
compton, result in that that window not being focused.

This commit makes compton mark focus update events, and only update
focus in critical section, after we managed all the new windows.

Fixes #177

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
Yuxuan Shui
2019-05-25 00:06:41 +01:00
parent 7d8a3e09be
commit c0053d1c8a
4 changed files with 31 additions and 31 deletions

View File

@@ -42,15 +42,11 @@ uint32_t determine_evmask(session_t *ps, xcb_window_t wid, win_evmode_t mode);
xcb_window_t find_client_win(session_t *ps, xcb_window_t w);
void recheck_focus(session_t *ps);
/// Handle configure event of a root window
void configure_root(session_t *ps, int width, int height);
void circulate_win(session_t *ps, xcb_circulate_notify_event_t *ce);
void update_ewmh_active_win(session_t *ps);
void update_refresh_rate(session_t *ps);
void root_damaged(session_t *ps);