shell-global: try to resync the pointer state after grabs
If the pointer moves on or off the stage while another process has a grab, we will lose track of it. One example of this is that if you use a popup menu from a message tray trayicon, the tray will stay up after the menu goes away, because the shell never saw the pointer leave it. Add a new method shell_global_sync_pointer() that causes clutter to recheck what actor is under the pointer and generate leave/enter events if appropriate. Of course, we can't actually tell for sure when another process has a grab, so we need a heuristic of when to call this. Currently we call it from Chrome._windowsRestacked(), which is not really the right thing at all, but does fix the menu-from-trayicon case... https://bugzilla.gnome.org/show_bug.cgi?id=630842
This commit is contained in:
@ -335,6 +335,11 @@ Chrome.prototype = {
|
||||
this._updateVisibility();
|
||||
this._queueUpdateRegions();
|
||||
}
|
||||
|
||||
// Figure out where the pointer is in case we lost track of
|
||||
// it during a grab. (In particular, if a trayicon popup menu
|
||||
// is dismissed, see if we need to close the message tray.)
|
||||
global.sync_pointer();
|
||||
},
|
||||
|
||||
_updateRegions: function() {
|
||||
|
Reference in New Issue
Block a user