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 693975 - More fixes for the GrabHelper
More fixes for the GrabHelper
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2013-02-16 18:21 UTC by Jasper St. Pierre (not reading bugmail)
Modified: 2013-02-16 18:34 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
grabHelper: Use a mode: js header (770 bytes, patch)
2013-02-16 18:21 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review
grabHelper: Correct typo preventing focus-window-changed disconnect (1.07 KB, patch)
2013-02-16 18:21 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review
grabHelper: Track the grab before trying to set key focus (1.41 KB, patch)
2013-02-16 18:22 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review
grabHelper: Ignore key focus changes when ungrabbing (2.20 KB, patch)
2013-02-16 18:22 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review

Description Jasper St. Pierre (not reading bugmail) 2013-02-16 18:21:54 UTC
drago01 spotted these while working on a message tray context menu.
Comment 1 Jasper St. Pierre (not reading bugmail) 2013-02-16 18:21:56 UTC
Created attachment 236389 [details] [review]
grabHelper: Use a mode: js header

This brings us into consistency with the rest of the modelines
Comment 2 Jasper St. Pierre (not reading bugmail) 2013-02-16 18:21:58 UTC
Created attachment 236390 [details] [review]
grabHelper: Correct typo preventing focus-window-changed disconnect

While debugging, I found that the signal to focus-window-changed
was never getting disconnected, making a call to ungrab every time
the focus window changed, even if there were no focus grabs anymore.
Comment 3 Jasper St. Pierre (not reading bugmail) 2013-02-16 18:22:01 UTC
Created attachment 236391 [details] [review]
grabHelper: Track the grab before trying to set key focus

If we don't this for a nested grabFocus grab, the notify::key-focus
will be called, not think that the new key focus is part of the
grab, and cancel the full grab. This leaves the grab helper in an
inconsistent and confused state, as the grab is pushed onto the
grab stack after.
Comment 4 Jasper St. Pierre (not reading bugmail) 2013-02-16 18:22:03 UTC
Created attachment 236392 [details] [review]
grabHelper: Ignore key focus changes when ungrabbing

Calling onUngrab() may change key focus, either directly or
indirectly (e.g. hiding the actor). Such key focus changes
would cause an extra actor to be ungrabbed, so make sure to
ignore such focus changes while we're ungrabbing.
Comment 5 drago01 2013-02-16 18:25:37 UTC
Review of attachment 236389 [details] [review]:

OK.
Comment 6 drago01 2013-02-16 18:26:20 UTC
Review of attachment 236390 [details] [review]:

Good catch.
Comment 7 drago01 2013-02-16 18:31:15 UTC
Review of attachment 236391 [details] [review]:

Makes sense.
Comment 8 drago01 2013-02-16 18:32:17 UTC
Review of attachment 236392 [details] [review]:

Makes sense and seems to fix the bug I saw while working on the menu.
Comment 9 Jasper St. Pierre (not reading bugmail) 2013-02-16 18:34:09 UTC
Attachment 236389 [details] pushed as fe2c201 - grabHelper: Use a mode: js header
Attachment 236390 [details] pushed as 5f995c6 - grabHelper: Correct typo preventing focus-window-changed disconnect
Attachment 236391 [details] pushed as 180000a - grabHelper: Track the grab before trying to set key focus
Attachment 236392 [details] pushed as 3628c81 - grabHelper: Ignore key focus changes when ungrabbing