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:
@ -103,10 +103,11 @@ MetaRectangle *shell_global_get_primary_monitor (ShellGlobal *global);
|
||||
int shell_global_get_primary_monitor_index (ShellGlobal *global);
|
||||
MetaRectangle *shell_global_get_focus_monitor (ShellGlobal *global);
|
||||
|
||||
void shell_global_get_pointer (ShellGlobal *global,
|
||||
int *x,
|
||||
int *y,
|
||||
ClutterModifierType *mods);
|
||||
void shell_global_get_pointer (ShellGlobal *global,
|
||||
int *x,
|
||||
int *y,
|
||||
ClutterModifierType *mods);
|
||||
void shell_global_sync_pointer (ShellGlobal *global);
|
||||
|
||||
GSettings *shell_global_get_settings (ShellGlobal *global);
|
||||
|
||||
|
Reference in New Issue
Block a user