x11: Avoid spurious focus events on grabs

We want to avoid handling focus events for the private focus window,
otherwise the keyboard grab taken by for example buttons will cause a
spurious FOCUS_OUT/FOCUS_IN on the toplevel.

The code that did this seems to have been lost in the XI2 transition for
GTK3.

https://bugzilla.gnome.org/show_bug.cgi?id=657578
This commit is contained in:
Benjamin Otte
2011-12-19 12:39:53 +01:00
parent 2ea328dfbc
commit db4a6040af
3 changed files with 9 additions and 0 deletions

View File

@ -1228,6 +1228,7 @@ gdk_x11_device_manager_xi2_translate_event (GdkEventTranslator *translator,
GUINT_TO_POINTER (xev->sourceid));
_gdk_device_manager_core_handle_focus (window,
xev->event,
device,
source_device,
(ev->evtype == XI_FocusIn) ? TRUE : FALSE,