mirror of
https://github.com/brl/mutter.git
synced 2025-06-13 16:59:30 +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:
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user