After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 786480 - Button grabs unintendedly cause shortcut inhibition dialog
Button grabs unintendedly cause shortcut inhibition dialog
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkButton
3.22.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2017-08-18 18:44 UTC by Carlos Garnacho
Modified: 2017-08-18 18:45 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gtkbutton: Avoid keyboard grabs (2.86 KB, patch)
2017-08-18 18:45 UTC, Carlos Garnacho
committed Details | Review

Description Carlos Garnacho 2017-08-18 18:44:16 UTC
On wayland, the shortcut inhibition will kick in whenever a client triggers keyboard grabs alone. However this is triggered too easily by GtkButton, since it tries to grab the keyboard in order to ensure it receives the key release event.

I'm attaching/pushing a patch removing the GDK grab, since it shouldn't be necessary at least for GTK+ situations, since comboboxes and menubuttons wait till key release before triggering the grab.
Comment 1 Carlos Garnacho 2017-08-18 18:45:08 UTC
The following fix has been pushed:
2218b5a gtkbutton: Avoid keyboard grabs
Comment 2 Carlos Garnacho 2017-08-18 18:45:15 UTC
Created attachment 357921 [details] [review]
gtkbutton: Avoid keyboard grabs

Seems to be there for the sole purpose of ensuring the button
shall receive the key release on keyboard-triggered activation.

For the cases where this makes sense (eg. comboboxes, menubuttons,
...) gtk+ already does ensure the menu is popup after key release.
This makes the grab pretty useless, and there's many other cases
where it doesn't make sense (eg. button being activated
programmatically from an event handler in another widget).

Fixes button activation unintendedly triggering shortcut inhibition
on wayland.