alt-F1 / alt-F2 shortcuts are not ungrabing keyboard and transferring focus correctly
Hello,
The background is in gtk#85 . One of the conclusions, in gtk#85 (comment 264804) , is that gnome-shell is not properly ungrabing the keyboard and transferring focus on alt-F1 / alt-F2 keyboard shortcuts.
How to reproduce:
- install gtk3, which contains the fix for gtk#85 (can be seen by gdk/x11/gdkdevicemanager-core-x11.c's APPEARS_FOCUSED testing for both has_focus and has_focus_window).
- run gnome-shell
- run accerciser, in its Event Monitor, open window element and enable window:activate and window:deactivate
- run e.g. gnome-terminal, accerciser shows window:activate for it
- press alt-f1
Result: accerciser shows only window:activate for gnome-shell
Expected result: accerciser should show a window:deactivate for gnome-terminal, and window:activate for gnome-shell
The same happens with the alt-f2 shortcut.
It used to work only by luck before, only because gtk used to deactivate itself during a keyboard grab. But as discussed in gtk#85 that behavior poses accessibility feedback issues, is not coherent, and keyboard grab feedback will not be available in wayland anyway. Thus @ebassi saying in gtk#85 (comment 264804) that not ungrabbing and transferring focus properly is a bug in the Shell accessibility layer.