GNOME Bugzilla – Bug 759395
GtkPopover disappears when 'ESC' is pressed
Last modified: 2016-01-28 15:52:35 UTC
As discussed in bug 740104, currently if the popover in the workspace has keyboard focus and one presses the ESC key, the popover disappears from the workspace. This should be addressed in glade-gtk-popover.c by handling the key events and overriding the popover's default behavior by returning TRUE in the event handler if the ESC key is sent to the popover.
I have a commit (https://git.gnome.org/browse/glade/commit/?h=wip/beniofel/popover&id=3c2b2ea3946d3797fa4de5527ab2230da9144b98) that solves this problem using the same signal stopping mechanism that glade-gtk-dialog.c uses
(In reply to Ben from comment #1) > I have a commit > (https://git.gnome.org/browse/glade/commit/?h=wip/beniofel/ > popover&id=3c2b2ea3946d3797fa4de5527ab2230da9144b98) that solves this > problem using the same signal stopping mechanism that glade-gtk-dialog.c uses Ben, is there a reason why we need to disable keynav completely when tabbing into a popover in Glade's workspace ? In general, we try to be the least intrusive as possible when we override how widgets in the workspace handle events, if we are stopping the emission completely in the dialog code, there is probably a reason for it (as I can see it is specifically with filechooser dialogs and with hierarchy changed signals). This should be less intrusive. Also, in GtkDialog we have a highly customized post_create() function and specifically avoid chaining up to the parent adaptor class post_create(). Unless it is for some reason problematic to chain up in post_create(), we should chain up in post_create() and continue to rely on the parent class implementation to add the placeholder and whatever else it may do.
Note that the problem is not exclusive to popovers or dialogs. If you run glade under Wayland (or with GTK_CSD=1 under X, I guess), windows you create have a titlebar, and clicking the close button on it quits glade.
(In reply to Matthias Clasen from comment #3) > Note that the problem is not exclusive to popovers or dialogs. If you run > glade under Wayland (or with GTK_CSD=1 under X, I guess), windows you create > have a titlebar, and clicking the close button on it quits glade. I recall we had a similar issue with headerbars, solution was to ensure the close button was unconditionally disabled in the workspace iirc. Opened a new issue to track this: bug 759455.
Fixed with this commit: commit 47c50da13920ddd9ceb7f627e6106e840693da39 Author: Tristan Van Berkom <tristan@upstairslabs.com> Date: Thu Jan 28 16:48:53 2016 +0100 Bug 759395 - Ignore ESC key press from popovers