Commit Graph

9 Commits

Author SHA1 Message Date
Owen W. Taylor
3902e8bff0 messageTray: fix dwelling during mouse-down
If the user has the mouse down - for example when they are selecting
text and dragging - then the attempt to get a modal grab will fail.

grabHelper: allow the .grab() function to fail and do nothing in this
modal case if the grab fails.

messageTray: handle grab failure and don't pop up the tray. Change the
logic for tray dwelling so that we only try to pop up the tray once
while the pointer is in the dwell area - this avoids the possiility
that the tray will pop up once the user releases the mouse.

https://bugzilla.gnome.org/show_bug.cgi?id=682385
2012-08-23 01:49:21 -04:00
Jasper St. Pierre
eebab34b62 grabHelper: Make sure to return not null when the stack contains fake grabs
We did this if there's nothing in the grab stack, but didn't do this
when there's no real grabs in the grab stack.
2012-08-19 21:15:52 -04:00
Jasper St. Pierre
4dfe3d21e1 messageTray: Always close the tray when clicking outside of it
Even when a summary box pointer item is up.
2012-08-19 21:15:50 -04:00
Jasper St. Pierre
3568e6d42d grabHelper: Only connect to specific signals when actually taking a grab
When we enter the overview, we don't explicitly don't take a grab, so we
shouldn't connect to key-focus-changed and things like that, otherwise
random overview code will drop our grab for us.

This fixes escape in the overview not dropping when a notification is up.
2012-08-19 21:15:50 -04:00
Jasper St. Pierre
c3ae4542b2 grabHelper: Fix ungrabbing properly
Make sure to account for modalCount properly, rather than just
tracking modalCount for the last actor on the stack. Additionally,
traverse the popped actors in the reverse order so that onUngrabbed
callbacks are called at the proper place in time.
2012-08-19 21:15:50 -04:00
Jasper St. Pierre
3031036cb0 grabHelper: Make sure to call onUngrabbed for all popped actors 2012-08-19 21:15:50 -04:00
Jasper St. Pierre
11dc510ae4 grabHelper: Fix some keyboard focus issues with the message tray
This will need to be revisited.
2012-08-19 21:15:49 -04:00
Jasper St. Pierre
79c25d1dc8 grabHelper: Clean up
Remove a dummy "return;", and remove an unused parameter.
2012-08-19 21:15:49 -04:00
Jasper St. Pierre
d766f865f3 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

https://bugzilla.gnome.org/show_bug.cgi?id=671001
2012-08-19 18:41:51 -04:00