summaryrefslogtreecommitdiff
path: root/src/backends/native/meta-cursor-renderer-native.c
diff options
context:
space:
mode:
authorJonas Ådahl <jadahl@gmail.com>2017-03-17 17:21:10 +0800
committerJonas Ådahl <jadahl@gmail.com>2017-04-07 22:30:49 +0800
commitafcc1bf512c96b9d39d0db000f77728b6dab9bdd (patch)
tree8ced718ab89beb55d465bc05e1da66f18f5ec350 /src/backends/native/meta-cursor-renderer-native.c
parent8a29c51b7359701a1b70ee0562f85fe0b85bb8a7 (diff)
downloadmutter-afcc1bf512c96b9d39d0db000f77728b6dab9bdd.tar.gz
monitor: Don't keep CRTC position in MetaMonitorCrtcMode
The CRTC position depends on the transform and how the transform is implemented. The function calculating the positions still doesn't support anything but the non-transformed case; this commit is in preparation of adding support for transforms. https://bugzilla.gnome.org/show_bug.cgi?id=777732
Diffstat (limited to 'src/backends/native/meta-cursor-renderer-native.c')
-rw-r--r--src/backends/native/meta-cursor-renderer-native.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/backends/native/meta-cursor-renderer-native.c b/src/backends/native/meta-cursor-renderer-native.c
index 5dbfadb8e..471106f22 100644
--- a/src/backends/native/meta-cursor-renderer-native.c
+++ b/src/backends/native/meta-cursor-renderer-native.c
@@ -240,15 +240,20 @@ update_monitor_crtc_cursor (MetaMonitor *monitor,
meta_cursor_renderer_native_get_instance_private (cursor_renderer_native);
MetaRectangle scaled_crtc_rect;
int scale;
+ int crtc_x, crtc_y;
if (meta_is_stage_views_scaled ())
scale = meta_logical_monitor_get_scale (data->in_logical_monitor);
else
scale = 1;
+ meta_monitor_calculate_crtc_pos (monitor, monitor_mode,
+ monitor_crtc_mode->output,
+ &crtc_x, &crtc_y);
+
scaled_crtc_rect = (MetaRectangle) {
- .x = monitor_crtc_mode->x / scale,
- .y = monitor_crtc_mode->y / scale,
+ .x = crtc_x / scale,
+ .y = crtc_y / scale,
.width = monitor_crtc_mode->crtc_mode->width / scale,
.height = monitor_crtc_mode->crtc_mode->height / scale
};