[mutter] backend/native: Don't double-scale pointer motions on scaled monitors



commit 5f2bb4306162f0284cae7599154d6537a72b00ed
Author: Jonas Ådahl <jadahl gmail com>
Date:   Wed Jun 7 17:32:59 2017 +0800

    backend/native: Don't double-scale pointer motions on scaled monitors
    
    We manually scaled pointer motions when they travel over a scaled
    monitor. When a stage view of a monitor is also scaled, in practice this
    meant we scaled twice. Avoid this by only manually scaling the pointer
    motion when stage views are not scaled.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=765011

 src/backends/native/meta-backend-native.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/backends/native/meta-backend-native.c b/src/backends/native/meta-backend-native.c
index f506f9e..eeb5ac1 100644
--- a/src/backends/native/meta-backend-native.c
+++ b/src/backends/native/meta-backend-native.c
@@ -341,6 +341,9 @@ relative_motion_filter (ClutterInputDevice *device,
   MetaLogicalMonitor *logical_monitor, *dest_logical_monitor;
   float new_dx, new_dy;
 
+  if (meta_is_stage_views_scaled ())
+    return;
+
   logical_monitor = meta_monitor_manager_get_logical_monitor_at (monitor_manager,
                                                                  x, y);
   if (!logical_monitor)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]