gtk2/gdk
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
..
broadway broadway: Cast g_object_ref() to the right type 2018-02-11 23:28:50 +00:00
deprecated gdkcolor.h: Use GDK_DEPRECATED_IN_3_14_FOR() throughout 2015-04-17 11:16:30 -05:00
mir mir: clean up an ugly function 2017-04-03 13:29:59 -04:00
quartz macos: export gdk_quartz_drag_source_context() 2018-03-01 14:35:05 +01:00
resources/glsl Use GLSL version 110 for OpenGL 2 shaders. 2016-11-01 11:58:16 -03:00
wayland wayland: Allow a NULL inhibitors hash table 2018-04-23 10:02:43 +01:00
win32 GDK W32: send a DELETE selection when using LOCAL selection protocol 2018-03-13 18:21:50 +00:00
x11 gdk: do not deactivate surface on keyboard grabs 2018-04-30 11:17:34 +02:00
COPYING Change FSF Address 2012-02-27 17:06:11 +00:00
fallback-c89.c fallback-c89: Include config.h 2017-05-22 14:26:32 +01:00
gdk-autocleanup.h gdk: Add support for g_autoptr() 2015-02-02 09:28:22 +01:00
gdk-private.c gdkwindow: add gdk_window_move_to_rect () 2016-07-19 09:38:54 -04:00
gdk-private.h gdkwindow: add gdk_window_move_to_rect () 2016-07-19 09:38:54 -04:00
gdk.c gdk: actually fix the previous commit 2016-06-29 15:10:39 +02:00
gdk.h gdk: Add GdkDevicePad 2016-08-23 21:01:44 +02:00
gdkapplaunchcontext.c Deprecate more to-be-removed screen apis 2016-10-20 13:44:23 -04:00
gdkapplaunchcontext.h Add GDK_AVAILABLE_IN_ALL annotations in gdk 2013-05-05 15:38:46 -04:00
gdkapplaunchcontextprivate.h Change FSF Address 2012-02-27 17:06:11 +00:00
gdkcairo.c gdkcairo: Bail if surface is in error 2015-02-25 01:55:28 +01:00
gdkcairo.h gdk: Deprecate gdk_cairo_create() 2016-06-09 17:45:40 +01:00
gdkconfig.h.win32 Clean up the pre-configured gdkconfig.h.win32 2013-05-28 13:04:37 +08:00
gdkconfig.h.win32_broadway Add Visual Studio Build Support for Broadway 2013-08-02 11:20:19 +08:00
gdkcursor.c Update cursor docs 2016-05-17 14:16:39 -04:00
gdkcursor.h Update docs 2015-05-08 13:34:25 -04:00
gdkcursorprivate.h gdk: Add gdk_cursor_get_surface() 2013-08-07 13:34:10 +02:00
gdkdeprecated.c docs: use Returns: consistently 2014-02-19 18:56:05 -05:00
gdkdevice.c Deprecate more to-be-removed screen apis 2016-10-20 13:44:23 -04:00
gdkdevice.h gdkdevice: Add GDK_SOURCE_TABLET_PAD input source type for GdkDevices 2016-08-23 21:01:44 +02:00
gdkdevicemanager.c doc: Replace uses of #NULL with %NULL 2017-11-22 20:58:00 +00:00
gdkdevicemanager.h gdk: Deprecate GdkDeviceManager and gdk_device_grab/ungrab() 2015-12-15 00:40:21 +01:00
gdkdevicemanagerprivate.h Change FSF Address 2012-02-27 17:06:11 +00:00
gdkdevicepad.c gdk: Add GdkDevicePad 2016-08-23 21:01:44 +02:00
gdkdevicepad.h gdk: Add GdkDevicePad 2016-08-23 21:01:44 +02:00
gdkdevicepadprivate.h gdk: Add GdkDevicePad 2016-08-23 21:01:44 +02:00
gdkdeviceprivate.h gdk: Add a private getter for GdkDevice::input-mode 2016-04-30 20:52:23 -04:00
gdkdevicetool.c gdk: Pass hardware ID on gdk_device_tool_new() 2016-08-23 21:01:44 +02:00
gdkdevicetool.h gdk: Add a getter for the hardware id of a GdkDeviceTool 2016-08-23 21:01:44 +02:00
gdkdevicetoolprivate.h gdk: Pass hardware ID on gdk_device_tool_new() 2016-08-23 21:01:44 +02:00
gdkdisplay.c GdkDisplay: Call the correct push|pop_error_trap() 2017-08-15 20:34:12 +01:00
gdkdisplay.h gdk: Fix parameter name mismatch 2016-05-08 15:34:28 +02:00
gdkdisplaymanager.c mir: try mir before x11 2017-03-13 03:52:06 -04:00
gdkdisplaymanager.h Add GDK_AVAILABLE_IN_ALL annotations in gdk 2013-05-05 15:38:46 -04:00
gdkdisplaymanagerprivate.h gdk: Unvfuncify gdk_display_manager_open_display() 2013-04-19 16:23:43 -04:00
gdkdisplayprivate.h display: Add vfunc for get_monitor_at_window 2016-05-18 19:07:27 +02:00
gdkdnd.c Add some missing (nullable) annotations 2016-09-22 14:02:07 +02:00
gdkdnd.h gdk: Add GdkDragCancelReason enum as argument to GdkDragContext::cancel 2016-02-15 18:35:51 +01:00
gdkdndprivate.h gdk/dnd: Don't use default display when getting cursor 2016-04-26 23:03:24 +08:00
gdkdrawingcontext.c gdk: Unset the DrawingContext <-> cairo_t link on dispose 2016-06-12 18:55:34 +01:00
gdkdrawingcontext.h Add GdkDrawingContext 2016-06-09 17:45:40 +01:00
gdkdrawingcontextprivate.h Add GdkDrawingContext 2016-06-09 17:45:40 +01:00
gdkenumtypes.c.template Include config.h in gdkenumtypes.c.template 2013-03-15 09:19:35 -04:00
gdkenumtypes.h.template Fix some oversights with header guards 2014-12-08 19:31:56 -05:00
gdkevents.c gdk: Add pad event structs, enum values, and event mask bit 2016-08-23 21:01:44 +02:00
gdkevents.h Fix introspection for GdkEventTouchpadPinch and GdkEventTouchpadSwipe. 2018-03-04 17:55:44 +01:00
gdkframeclock.c Add proper annotation for gdk_frame_clock_get_refresh_info 2018-03-12 16:06:46 +01:00
gdkframeclock.h Fix some oversights with header guards 2014-12-08 19:31:56 -05:00
gdkframeclockidle.c Fix irregular gdk_frame_clock_get_frame_time 2018-02-14 08:02:52 -05:00
gdkframeclockidle.h GdkFrameClockIdle: Add a missing declaration 2014-09-05 20:44:22 -04:00
gdkframeclockprivate.h frametimings: reuse previous frame timing in common case 2016-04-26 09:06:07 -04:00
gdkframetimings.c frametimings: reuse previous frame timing in common case 2016-04-26 09:06:07 -04:00
gdkframetimings.h Fix some oversights with header guards 2014-12-08 19:31:56 -05:00
gdkgl.c gl: Check for GL_EXT_framebuffer_blit before using glBlitFramebuffer 2016-12-14 20:55:21 +00:00
gdkglcontext.c doc: Replace uses of #NULL with %NULL 2017-11-22 20:58:00 +00:00
gdkglcontext.h gdk/gl: Allow autodetection for GL/GLES 2016-10-21 11:41:43 -04:00
gdkglcontextprivate.h gl: Use a uniform to flip R and B colors on GLES 2016-04-25 14:33:36 +01:00
gdkglobals.c Add GDK_GL env var and GdkGLFlags 2014-11-06 12:24:43 +01:00
gdkinternals.h gdkwindow: Avoid re-setting the opaque region if it doesn't change 2017-08-18 18:58:19 +02:00
gdkintl.h Change FSF Address 2012-02-27 17:06:11 +00:00
gdkkeynames.c Keep XF86 keysym names working 2013-04-19 20:11:39 -04:00
gdkkeys.c docs: Properly deprecate gdk_keymap_get_default() 2018-02-11 23:28:50 +00:00
gdkkeys.h Add some deprecation annotations 2017-12-25 23:00:30 -05:00
gdkkeysprivate.h gdkkeys: Add support to _get_scroll_lock_state() 2015-04-27 20:07:52 -03:00
gdkkeysyms-compat.h Update gdkkeysyms.h header 2013-04-19 20:11:38 -04:00
gdkkeysyms-update.pl gdkkeysyms-update: Remove workarounds for old bugs 2013-07-17 16:40:05 -04:00
gdkkeysyms.h Update gdkkeysyms.h header 2013-04-19 20:11:38 -04:00
gdkkeyuni.c GDK W32: Cache multiple keyboard layouts simultaneously 2016-08-04 16:37:18 +00:00
gdkmain.h Add some deprecation annotations 2017-12-25 23:00:30 -05:00
gdkmarshalers.list gdkwindow: add gdk_window_move_to_rect () 2016-07-19 09:38:54 -04:00
gdkmonitor.c GdkMonitor: Fix link to nonexistent Display method 2018-01-13 20:03:37 +00:00
gdkmonitor.h gdk: Fix parameter name mismatch 2016-05-08 15:34:28 +02:00
gdkmonitorprivate.h Add GdkMonitor 2016-04-27 23:18:16 -04:00
gdkoffscreenwindow.c gdkoffscreenwindow: use embedder to derive surfaces & scale factor 2015-12-03 21:47:29 +00:00
gdkpango.c Add docs for new API 2016-04-18 11:46:58 -04:00
gdkpango.h Add gdk_pango_context_get_for_display 2016-04-18 07:04:44 -04:00
gdkpixbuf-drawable.c Fix the fix to the last commit 2015-12-16 12:42:27 +00:00
gdkpixbuf.h Add GDK_AVAILABLE_IN_ALL annotations in gdk 2013-05-05 15:38:46 -04:00
gdkprivate.h Make gdk_event_get_pointer_emulated public 2016-05-10 15:16:45 -04:00
gdkproperty.c Trivial formatting fix 2014-08-30 00:53:21 -04:00
gdkproperty.h Add GDK_AVAILABLE_IN_ALL annotations in gdk 2013-05-05 15:38:46 -04:00
gdkrectangle.c Clarify docs for gdk_rectangle_union 2016-01-20 13:44:34 -05:00
gdkrectangle.h gdk: Add gdk_rectangle_equal() 2015-10-03 22:26:27 -04:00
gdkrgba.c gdkrgba: Add a missing apostrophe in a doc comment 2018-03-19 15:13:04 +00:00
gdkrgba.h Add GDK_AVAILABLE_IN_ALL annotations in gdk 2013-05-05 15:38:46 -04:00
gdkscreen.c gdk: Fix gdk_screen_get_monitor_workarea not returning work area 2017-10-12 09:03:13 +13:00
gdkscreen.h Deprecate more to-be-removed screen apis 2016-10-20 13:44:23 -04:00
gdkscreenprivate.h Handle resolution changes in the GDK backend code 2014-07-13 15:35:23 -04:00
gdkseat.c gdk: Add GdkSeat::tool-added/removed signals 2016-04-06 15:43:29 +02:00
gdkseat.h GdkSeat: Add G_BEGIN_DECLS and G_END_DECLS 2015-12-22 10:33:41 +01:00
gdkseatdefault.c gdkseatdefault: Grab touch events where applicable 2017-09-20 19:19:31 +01:00
gdkseatdefaultprivate.h GdkSeatDefault: Add functions to add/remove tools 2016-04-06 15:43:29 +02:00
gdkseatprivate.h gdk: Add GdkSeat::tool-added/removed signals 2016-04-06 15:43:29 +02:00
gdkselection.c gdkselection: Clarify that X is only a design base 2018-04-22 16:11:01 +01:00
gdkselection.h Drop GDK_MULTIHEAD_SAFE 2014-06-11 21:55:15 -04:00
gdktestutils.h Add GDK_AVAILABLE_IN_ALL annotations in gdk 2013-05-05 15:38:46 -04:00
gdkthreads.h Add GDK_AVAILABLE_IN_ALL annotations in gdk 2013-05-05 15:38:46 -04:00
gdktypes.h gdk: Fix GDK_ALL_EVENTS_MASK 2017-11-13 23:42:51 +01:00
gdkversionmacros.h.in Revert "Add GDK_AVAILABLE_IN_3_90" 2016-10-06 16:42:22 +02:00
gdkvisual.c visual: Deprecate querying APIs 2016-10-28 06:04:58 +02:00
gdkvisual.h visual: Deprecate querying APIs 2016-10-28 06:04:58 +02:00
gdkvisualprivate.h gdk: calculate pixel color shift and precision lazily 2016-02-27 12:27:54 +01:00
gdkwindow.c gdk: Always emit motion after enter 2017-11-30 19:26:48 +01:00
gdkwindow.h Deprecate gdk_window_process[_all]_updates 2017-01-10 20:25:15 -05:00
gdkwindowimpl.c gdkwindow: Use toplevel for getting root cords in move_to_rect() 2016-08-18 04:51:57 -04:00
gdkwindowimpl.h gdkwindow: add gdk_window_move_to_rect () 2016-07-19 09:38:54 -04:00
gdkx.h Change FSF Address 2012-02-27 17:06:11 +00:00
gen-keyname-table.pl gdk: Make gen-keyname-table.pl work again 2011-10-26 10:36:43 +01:00
keyname-table.h gdk: Translate some more key names 2017-10-09 20:31:58 +02:00
keynames-translate.txt gdk: Translate some more key names 2017-10-09 20:31:58 +02:00
keynames.txt Fix key "Page_Down" identified as "Next" 2013-10-24 18:48:33 -04:00
Makefile.am build: Don't include the marshallers header file 2017-05-09 14:19:51 +01:00
makefile.msc win32: gdk3 resurrection 2011-01-02 13:33:04 +01:00