diff options
author | Owen W. Taylor <otaylor@fishsoup.net> | 2013-12-16 16:01:04 -0500 |
---|---|---|
committer | Alberts Muktupāvels <alberts.muktupavels@gmail.com> | 2018-09-10 13:38:23 +0300 |
commit | 9956d376d38d0ad6b266ff7963e00e0a5dfcea2f (patch) | |
tree | 5c66508d576089ea12610dc55653bc9c00ddc85c /src/core/display-private.h | |
parent | b96341dabffc3589520343ef0b5590945a67a736 (diff) | |
download | metacity-9956d376d38d0ad6b266ff7963e00e0a5dfcea2f.tar.gz |
fix problems with focus trackinggnome-3-28
When a client spontaneously focuses their window, perhaps in response
to WM_TAKE_FOCUS we'll get a FocusOut/FocusIn pair with same serial.
Updating display->focus_serial in response to FocusOut then was causing
us to ignore FocusIn and think that the focus was not on any window.
We need to distinguish this spontaneous case from the case where we
set the focus ourselves - when we set the focus ourselves, we're careful
to combine the SetFocus with a property change so that we know definitively
what focus events we have already accounted for.
https://bugzilla.gnome.org/show_bug.cgi?id=720558
Diffstat (limited to 'src/core/display-private.h')
-rw-r--r-- | src/core/display-private.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/core/display-private.h b/src/core/display-private.h index c9e919e4..b2ed8f38 100644 --- a/src/core/display-private.h +++ b/src/core/display-private.h @@ -128,6 +128,14 @@ struct _MetaDisplay */ guint allow_terminal_deactivation : 1; + /* If true, server->focus_serial refers to us changing the focus; in + * this case, we can ignore focus events that have exactly focus_serial, + * since we take care to make another request immediately afterwards. + * But if focus is being changed by another client, we have to accept + * multiple events with the same serial. + */ + guint focused_by_us : 1; + /*< private-ish >*/ guint error_trap_synced_at_last_pop : 1; MetaEventQueue *events; |