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

@ -230,6 +230,8 @@ typedef struct session {
/// If compton should quit
bool quit:1;
/// Whether there are pending updates, like window creation, etc.
/// TODO use separate flags for dfferent kinds of updates so we don't
/// waste our time.
bool pending_updates:1;
// === Expose event related ===