gtk2/gdk/x11
Samuel Thibault c926b28d96 gdk: do not deactivate surface on keyboard grabs
When pressing e.g. a window manager shortcut, which acquires keyboard grab,
Xorg would send FocusOut NotifyGrab then FocusIn NotifyUngrab.  Currently
gdk would then deactivate the current surface, which makes accessibility
screen readers think that we have switched to a non-accessible application
and came back again, and thus reannounce the application frame etc. which we
don't want when e.g. just raising volume.

And actually, receiving FocusOut NotifyGrab does not mean losing the
X focus, it only means an application aqcuired a grab, i.e. it is
temporarily stealing keyboard events. On Wayland, this isn't even
notified actually.

This commit makes gdk only deactivate surfaces when there was an actual
focus switch to another window, as determined by has_focus_window (instead
of just has_focus), which happens either normally through FocusOut with
NotifyNormal, or during grabs through FocusOut with NotifyWhileGrabbed.

Fixes #85

(cherry picked from commit 01455399e8)
2018-04-30 11:17:34 +02:00
..
gdkapplaunchcontext-x11.c Deprecate more to-be-removed screen apis 2016-10-20 13:44:23 -04:00
gdkasync.c x11: Fix compiler warnings 2015-06-02 09:08:14 -04:00
gdkasync.h Change FSF Address 2012-02-27 17:06:11 +00:00
gdkcursor-x11.c Deprecate to-be-removed screen API 2016-10-20 12:06:42 -04:00
gdkdevice-core-x11.c Add and use GDK_CHECK_DEBUG macro 2016-02-28 21:40:30 -05:00
gdkdevice-xi2.c Add and use GDK_CHECK_DEBUG macro 2016-02-28 21:40:30 -05:00
gdkdevicemanager-core-x11.c gdk: do not deactivate surface on keyboard grabs 2018-04-30 11:17:34 +02:00
gdkdevicemanager-x11.c x11: Don't use g_print for debug output 2016-02-28 21:40:24 -05:00
gdkdevicemanager-xi2.c gdk/x11: Extract GdkDeviceTool tool ID from "Wacom Serial IDs" property 2017-08-17 16:26:12 +02:00
gdkdevicemanagerprivate-core.h x11: Avoid spurious focus events on grabs 2012-03-07 15:35:21 +01:00
gdkdisplay-x11.c gdk_x11_display_get_monitor: fix monitor number test logic 2018-04-09 18:27:44 +01:00
gdkdisplay-x11.h x11: Port to new monitor api 2016-04-27 23:18:16 -04:00
gdkdisplaymanager-x11.c displaymanager: Remove GInitable implementation 2013-05-02 16:17:30 +02:00
gdkdnd-x11.c x11: Balance an error trap 2018-02-11 23:28:50 +00:00
gdkeventsource.c gdk: do not deactivate surface on keyboard grabs 2018-04-30 11:17:34 +02:00
gdkeventsource.h Fix some oversights with header guards 2014-12-08 19:31:56 -05:00
gdkeventtranslator.c Change FSF Address 2012-02-27 17:06:11 +00:00
gdkeventtranslator.h Change FSF Address 2012-02-27 17:06:11 +00:00
gdkgeometry-x11.c x11: Fix compiler warnings 2015-06-02 09:08:14 -04:00
gdkglcontext-x11.c x11: Query whether we have GLX support 2018-04-23 09:13:41 +01:00
gdkglcontext-x11.h Remove GdkGLProfile 2015-02-12 17:51:31 +00:00
gdkkeys-x11.c x11: Fix compiler warnings 2015-06-02 09:08:14 -04:00
gdkmain-x11.c x11: Don't warn if the display is closed 2016-11-30 13:46:29 -05:00
gdkmonitor-x11.c x11: Port to new monitor api 2016-04-27 23:18:16 -04:00
gdkmonitor-x11.h x11: Port to new monitor api 2016-04-27 23:18:16 -04:00
gdkprivate-x11.h Remove a dead macro 2018-01-07 16:38:42 +00:00
gdkproperty-x11.c Remove unused variables 2015-06-13 21:10:26 -04:00
gdkscreen-x11.c x11: Avoid a division by zero 2018-03-08 16:00:40 +01:00
gdkscreen-x11.h Deprecate more to-be-removed screen apis 2016-10-20 13:44:23 -04:00
gdkselection-x11.c x11: Use g_error_matches() 2016-03-20 05:43:02 +01:00
gdksettings.c gdk: Add an X setting for gtk-keynav-use-caret 2016-03-04 22:44:29 -05:00
gdktestutils-x11.c Change FSF Address 2012-02-27 17:06:11 +00:00
gdkvisual-x11.c Add and use GDK_CHECK_DEBUG macro 2016-02-28 21:40:30 -05:00
gdkwindow-x11.c x11: Avoid crash in fallback move emulation 2017-12-15 16:17:27 -05:00
gdkwindow-x11.h x11: Add support for _GTK_EDGE_CONSTRAINTS atom 2017-10-03 20:06:46 -03:00
gdkx11applaunchcontext.h Add GDK_AVAILABLE_IN_ALL annotations in gdk 2013-05-05 15:38:46 -04:00
gdkx11cursor.h docs: don't use <type> tags 2014-01-28 00:21:26 -05:00
gdkx11device-core.h Add GDK_AVAILABLE_IN_ALL annotations in gdk 2013-05-05 15:38:46 -04:00
gdkx11device-xi2.h Add GDK_AVAILABLE_IN_ALL annotations in gdk 2013-05-05 15:38:46 -04:00
gdkx11device.h Move single-include guards inside include guards 2012-12-28 09:57:56 -05:00
gdkx11devicemanager-core.h Add GDK_AVAILABLE_IN_ALL annotations in gdk 2013-05-05 15:38:46 -04:00
gdkx11devicemanager-xi2.h Add GDK_AVAILABLE_IN_ALL annotations in gdk 2013-05-05 15:38:46 -04:00
gdkx11devicemanager-xi.h Add GDK_AVAILABLE_IN_ALL annotations in gdk 2013-05-05 15:38:46 -04:00
gdkx11devicemanager.h Move single-include guards inside include guards 2012-12-28 09:57:56 -05:00
gdkx11display.h x11: Add gdk_x11_display_set_window_scale 2013-08-20 11:15:08 +02:00
gdkx11displaymanager.h Add GDK_AVAILABLE_IN_ALL annotations in gdk 2013-05-05 15:38:46 -04:00
gdkx11dnd.h Add GDK_AVAILABLE_IN_ALL annotations in gdk 2013-05-05 15:38:46 -04:00
gdkx11glcontext.h GL: Follow naming conventions 2014-10-21 23:48:12 -04:00
gdkx11keys.h Add GDK_AVAILABLE_IN_ALL annotations in gdk 2013-05-05 15:38:46 -04:00
gdkx11monitor.h x11: Port to new monitor api 2016-04-27 23:18:16 -04:00
gdkx11property.h Drop GDK_MULTIHEAD_SAFE 2014-06-11 21:55:15 -04:00
gdkx11screen.h Drop GDK_MULTIHEAD_SAFE 2014-06-11 21:55:15 -04:00
gdkx11selection.h Add GDK_AVAILABLE_IN_ALL annotations in gdk 2013-05-05 15:38:46 -04:00
gdkx11utils.h Drop GDK_MULTIHEAD_SAFE 2014-06-11 21:55:15 -04:00
gdkx11visual.h Add GDK_AVAILABLE_IN_ALL annotations in gdk 2013-05-05 15:38:46 -04:00
gdkx11window.h docs: don't use <type> tags 2014-01-28 00:21:26 -05:00
gdkx-autocleanups.h gdk: Add support for g_autoptr() 2015-02-02 09:28:22 +01:00
gdkx.h x11: Port to new monitor api 2016-04-27 23:18:16 -04:00
gdkxftdefaults.c Simplify Xft setting fallback 2015-07-07 20:54:16 -04:00
gdkxid.c docs: use Returns: consistently 2014-02-19 18:56:05 -05:00
Makefile.am Opt in to structured logging 2016-07-22 23:13:20 -04:00
MwmUtil.h Change FSF Address 2012-02-27 17:06:11 +00:00
xsettings-client.c x11: Don't use g_print for debug output 2016-02-28 21:40:24 -05:00
xsettings-client.h Fix font size when gdk_x11_display_set_window_scale() is used 2014-03-06 23:20:00 -05:00