mirror of
https://github.com/brl/mutter.git
synced 2024-12-23 03:22:04 +00:00
backends/x11: Fallback to the first logical monitor when out of focus
When running nested, the pointer can be outside of the stage, meaning outside of any logical monitor. Handle this when getting the current logical monitor by falling back to the first logical monitor when the pointer coordinate is outside of any logical monitor. https://bugzilla.gnome.org/show_bug.cgi?id=779001
This commit is contained in:
parent
542ed1d024
commit
4e4b24e7a8
@ -535,6 +535,9 @@ meta_backend_x11_get_current_logical_monitor (MetaBackend *backend)
|
||||
logical_monitor =
|
||||
meta_monitor_manager_get_logical_monitor_at (monitor_manager, x, y);
|
||||
|
||||
if (!logical_monitor && monitor_manager->logical_monitors)
|
||||
logical_monitor = monitor_manager->logical_monitors->data;
|
||||
|
||||
priv->cached_current_logical_monitor = logical_monitor;
|
||||
return priv->cached_current_logical_monitor;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user