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
This commit is contained in:
Hans de Goede 2017-10-06 14:48:32 +02:00 committed by Jonas Ådahl
parent e59ca14f6c
commit 383ac76d00

View File

@ -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,10 +476,18 @@ cursor_over_transformed_logical_monitor (MetaCursorRenderer *renderer,
NULL))
continue;
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;
}