[mutter] cursor-renderer-native: Take panel-orientation into account
- From: Jonas Ådahl <jadahl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] cursor-renderer-native: Take panel-orientation into account
- Date: Mon, 25 Dec 2017 09:07:33 +0000 (UTC)
commit 383ac76d00619ba4db6fac957dcbfaa921f333b1
Author: Hans de Goede <hdegoede redhat com>
Date: Fri Oct 6 14:48:32 2017 +0200
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 files 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 30342b5..b28d26c 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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]