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 759395 - GtkPopover disappears when 'ESC' is pressed
GtkPopover disappears when 'ESC' is pressed
Status: RESOLVED FIXED
Product: glade
Classification: Applications
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Glade 3 Maintainers
Glade 3 Maintainers
Depends on:
Blocks:
 
 
Reported: 2015-12-13 05:10 UTC by Tristan Van Berkom
Modified: 2016-01-28 15:52 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Tristan Van Berkom 2015-12-13 05:10:30 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.
Comment 1 Ben 2015-12-14 00:31:06 UTC
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
Comment 2 Tristan Van Berkom 2015-12-14 06:44:48 UTC
(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.
Comment 3 Matthias Clasen 2015-12-14 14:50:26 UTC
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.
Comment 4 Tristan Van Berkom 2015-12-14 15:04:32 UTC
(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.
Comment 5 Tristan Van Berkom 2016-01-28 15:52:35 UTC
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