From 383ac76d00619ba4db6fac957dcbfaa921f333b1 Mon Sep 17 00:00:00 2001 From: Hans de Goede Date: Fri, 6 Oct 2017 14:48:32 +0200 Subject: [PATCH] cursor-renderer-native: Take panel-orientation into account Even if the logical_monitor config does not have an active transform, we might still be doing a transform under the hood to compensate for panel-orientation. Check for this and fall back to the sw cursor if this is the case. https://bugzilla.gnome.org/show_bug.cgi?id=782294 --- src/backends/native/meta-cursor-renderer-native.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/src/backends/native/meta-cursor-renderer-native.c b/src/backends/native/meta-cursor-renderer-native.c index 30342b587..b28d26ca3 100644 --- a/src/backends/native/meta-cursor-renderer-native.c +++ b/src/backends/native/meta-cursor-renderer-native.c @@ -465,6 +465,7 @@ cursor_over_transformed_logical_monitor (MetaCursorRenderer *renderer, MetaRectangle logical_monitor_layout; ClutterRect logical_monitor_rect; MetaMonitorTransform transform; + GList *monitors, *l_mon; logical_monitor_layout = meta_logical_monitor_get_layout (logical_monitor); @@ -475,9 +476,17 @@ cursor_over_transformed_logical_monitor (MetaCursorRenderer *renderer, NULL)) continue; - transform = meta_logical_monitor_get_transform (logical_monitor); - if (transform != META_MONITOR_TRANSFORM_NORMAL) - return TRUE; + monitors = meta_logical_monitor_get_monitors (logical_monitor); + for (l_mon = monitors; l_mon; l_mon = l_mon->next) + { + MetaMonitor *monitor = l_mon->data; + + transform = meta_logical_monitor_get_transform (logical_monitor); + /* Get transform corrected for LCD panel-orientation. */ + transform = meta_monitor_logical_to_crtc_transform (monitor, transform); + if (transform != META_MONITOR_TRANSFORM_NORMAL) + return TRUE; + } } return FALSE;