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 671001 - Fix message tray breakage, part one
Fix message tray breakage, part one
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
: 670639 670641 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2012-02-28 20:14 UTC by Jasper St. Pierre (not reading bugmail)
Modified: 2012-08-20 01:17 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
st-scroll-bar: use clutter_grab_pointer() (7.04 KB, patch)
2012-02-28 20:14 UTC, Jasper St. Pierre (not reading bugmail)
reviewed Details | Review
Introduce a new GrabHelper (31.42 KB, patch)
2012-02-28 20:14 UTC, Jasper St. Pierre (not reading bugmail)
none Details | Review
grabHelper: Explicitly grab the key focus if we can't navigate inside (1.32 KB, patch)
2012-02-28 20:14 UTC, Jasper St. Pierre (not reading bugmail)
none Details | Review
messageTray: Make sure to make the summary box pointer a grab parent (1.14 KB, patch)
2012-02-28 20:14 UTC, Jasper St. Pierre (not reading bugmail)
none Details | Review
st-scroll-bar: use clutter_grab_pointer() (6.98 KB, patch)
2012-02-28 20:43 UTC, Jasper St. Pierre (not reading bugmail)
none Details | Review
st-scroll-bar: use clutter_grab_pointer() (6.98 KB, patch)
2012-02-29 20:12 UTC, Jasper St. Pierre (not reading bugmail)
needs-work Details | Review
Introduce a new GrabHelper (31.42 KB, patch)
2012-02-29 20:12 UTC, Jasper St. Pierre (not reading bugmail)
none Details | Review
grabHelper: Explicitly grab the key focus if we can't navigate inside (1.32 KB, patch)
2012-02-29 20:12 UTC, Jasper St. Pierre (not reading bugmail)
accepted-commit_now Details | Review
messageTray: Make sure to make the summary box pointer a grab parent (1.14 KB, patch)
2012-02-29 20:12 UTC, Jasper St. Pierre (not reading bugmail)
reviewed Details | Review
messageTray: Make sure to always grab focus (1.03 KB, patch)
2012-03-01 00:34 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review
messageTray: Make sure the summary box pointer is included in "contains" checks (1.91 KB, patch)
2012-03-01 00:34 UTC, Jasper St. Pierre (not reading bugmail)
committed Details | Review

Description Jasper St. Pierre (not reading bugmail) 2012-02-28 20:14:04 UTC
The message tray would flash your focused window and hide itself at seemingly
random times when activating it. This patch stack should fix the issue.
Comment 1 Jasper St. Pierre (not reading bugmail) 2012-02-28 20:14:07 UTC
Created attachment 208627 [details] [review]
st-scroll-bar: use clutter_grab_pointer()

StScrollBar was intercepting motion events by using captured-event on
the stage, which required additional dirty tricks, which required
additional hacks. Simplify it by just using clutter_grab_pointer()
instead.

https://bugzilla.gnome.org/show_bug.cgi?id=648788
Comment 2 Jasper St. Pierre (not reading bugmail) 2012-02-28 20:14:11 UTC
Created attachment 208628 [details] [review]
Introduce a new GrabHelper

PopupMenu.PopupMenuManager and MessageTray.FocusGrabber had a lot of
code in common. Let's refactor this common code out into a new class,
"GrabHelper". This replaces FocusGrabber completely, and nukes half
of PopupMenuManager.

Based on a patch by Dan Winship <danw@gnome.org>

https://bugzilla.gnome.org/show_bug.cgi?id=643687
Comment 3 Jasper St. Pierre (not reading bugmail) 2012-02-28 20:14:14 UTC
Created attachment 208629 [details] [review]
grabHelper: Explicitly grab the key focus if we can't navigate inside

GrabHelper assumes that we've always grabbed the key focus if we've called
navigate. If the widget or any of its descendents are focusable, that's
a bogus assumption. Fix it by explicitly grabbing the key focus if we've
failed to navigate inside the widget.
Comment 4 Jasper St. Pierre (not reading bugmail) 2012-02-28 20:14:17 UTC
Created attachment 208630 [details] [review]
messageTray: Make sure to make the summary box pointer a grab parent

The summary box pointer isn't a child of the message tray, so in order to
prevent losing grab focus when showing the summary box pointer we need
to add it as an allowed grab parent.
Comment 5 Jasper St. Pierre (not reading bugmail) 2012-02-28 20:14:56 UTC
*** Bug 670639 has been marked as a duplicate of this bug. ***
Comment 6 Jasper St. Pierre (not reading bugmail) 2012-02-28 20:15:08 UTC
*** Bug 670641 has been marked as a duplicate of this bug. ***
Comment 7 Florian Müllner 2012-02-28 20:18:15 UTC
Review of attachment 208627 [details] [review]:

The differences to Dan's original patch look pretty minimal, so you should leave the original author in place. Other than that looks good (oh, there are also two bug URLs, which is a bit confusing)
Comment 8 Jasper St. Pierre (not reading bugmail) 2012-02-28 20:43:14 UTC
Created attachment 208634 [details] [review]
st-scroll-bar: use clutter_grab_pointer()

StScrollBar was intercepting motion events by using captured-event on
the stage, which required additional dirty tricks, which required
additional hacks. Simplify it by just using clutter_grab_pointer()
instead.



OK, figured out how to do that.
Comment 9 Jasper St. Pierre (not reading bugmail) 2012-02-29 20:12:21 UTC
Created attachment 208716 [details] [review]
st-scroll-bar: use clutter_grab_pointer()

StScrollBar was intercepting motion events by using captured-event on
the stage, which required additional dirty tricks, which required
additional hacks. Simplify it by just using clutter_grab_pointer()
instead.
Comment 10 Jasper St. Pierre (not reading bugmail) 2012-02-29 20:12:29 UTC
Created attachment 208717 [details] [review]
Introduce a new GrabHelper

PopupMenu.PopupMenuManager and MessageTray.FocusGrabber had a lot of
code in common. Let's refactor this common code out into a new class,
"GrabHelper". This replaces FocusGrabber completely, and nukes half
of PopupMenuManager.

Based on a patch by Dan Winship <danw@gnome.org>

https://bugzilla.gnome.org/show_bug.cgi?id=643687
Comment 11 Jasper St. Pierre (not reading bugmail) 2012-02-29 20:12:36 UTC
Created attachment 208718 [details] [review]
grabHelper: Explicitly grab the key focus if we can't navigate inside

GrabHelper assumes that we've always grabbed the key focus if we've called
navigate. If the widget or any of its descendents are focusable, that's
a bogus assumption. Fix it by explicitly grabbing the key focus if we've
failed to navigate inside the widget.
Comment 12 Jasper St. Pierre (not reading bugmail) 2012-02-29 20:12:49 UTC
Created attachment 208719 [details] [review]
messageTray: Make sure to make the summary box pointer a grab parent

The summary box pointer isn't a child of the message tray, so in order to
prevent losing grab focus when showing the summary box pointer we need
to add it as an allowed grab parent.



Rebase the patch-set onto master.
Comment 13 Florian Müllner 2012-02-29 20:34:20 UTC
Review of attachment 208716 [details] [review]:

::: js/ui/popupMenu.js
@@ -842,3 @@
-        // Can be set while a menu is up to let all events through without special
-        // menu handling useful for scrollbars in menus, and probably not otherwise.
-        this.passEvents = false;

Removing passEvents breaks the combo box in the user menu (open the child menu, then click somewhere else to dismiss it - breakage is particularly bad when "somewhere else" is an item in the parent menu)
Comment 14 Florian Müllner 2012-02-29 22:12:41 UTC
Review of attachment 208718 [details] [review]:

This one looks good
Comment 15 Florian Müllner 2012-02-29 22:12:48 UTC
Review of attachment 208719 [details] [review]:

Not sure why this is separate from the original grabHelper patch
Comment 16 Jasper St. Pierre (not reading bugmail) 2012-02-29 22:13:25 UTC
Review of attachment 208719 [details] [review]:

I'll squash it when I commit it, I guess.
Comment 17 Jasper St. Pierre (not reading bugmail) 2012-03-01 00:34:37 UTC
Created attachment 208734 [details] [review]
messageTray: Make sure to always grab focus

If a widget isn't focusable or none of its children are focusable, then
navigate_focus will return false and the key focus won't be set. We
need to explicitly grab the key focus in this case.



Ugh, so trying to fix grabhelper to handle child menus is a big pain...

I have a plan for how to refactor that in the future, but for now, let's
just take the easy way out.
Comment 18 Jasper St. Pierre (not reading bugmail) 2012-03-01 00:34:43 UTC
Created attachment 208735 [details] [review]
messageTray: Make sure the summary box pointer is included in "contains" checks

The summary box pointer isn't a part of this.actor, it's added directly to the
uiGroup. If the focused actor changes to the summary box pointer, we need to
make sure that we aren't ungrabbing the focus, as it's technically part of
the message tray.
Comment 19 Jasper St. Pierre (not reading bugmail) 2012-03-01 03:44:27 UTC
Review of attachment 208735 [details] [review]:

Ugh, this is just wrong.
Comment 20 Florian Müllner 2012-03-01 07:47:01 UTC
Review of attachment 208734 [details] [review]:

Sure, go ahead ...
Comment 21 Jasper St. Pierre (not reading bugmail) 2012-03-01 08:00:36 UTC
Attachment 208734 [details] pushed as 7d29e69 - messageTray: Make sure to always grab focus


So it seems that the other commit is only required for the GrabHelper port - this should fix the message tray entirely, here.