[mutter] backends/x11: Fallback to the first logical monitor when out of focus
- From: Jonas Ådahl <jadahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] backends/x11: Fallback to the first logical monitor when out of focus
- Date: Mon, 6 Mar 2017 14:40:11 +0000 (UTC)
commit 4e4b24e7a87ac4f331d9e4447e9bfddaf9e64c55
Author: Jonas Ådahl <jadahl gmail com>
Date: Mon Mar 6 16:26:50 2017 +0800
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
src/backends/x11/meta-backend-x11.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/backends/x11/meta-backend-x11.c b/src/backends/x11/meta-backend-x11.c
index 0306232..83d30d8 100644
--- a/src/backends/x11/meta-backend-x11.c
+++ b/src/backends/x11/meta-backend-x11.c
@@ -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;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]