[mutter/gnome-3-22] wayland/touch: Use surface relative coordinate	helper
- From: Jonas Ådahl <jadahl src gnome org>
- To: commits-list gnome org
- Cc: 
- Subject: [mutter/gnome-3-22] wayland/touch: Use surface relative coordinate	helper
- Date: Tue, 18 Oct 2016 09:18:01 +0000 (UTC)
commit 803148ed1fba9077c40a5b36aa8322fabf7d5a80
Author: Jonas Ådahl <jadahl gmail com>
Date:   Fri Sep 23 14:08:49 2016 +0800
    wayland/touch: Use surface relative coordinate helper
    
    Use the global to surface local coordinate converter helper, as that
    will currently convert coordinates for Xwayland client more correctly.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=768039
 src/wayland/meta-wayland-touch.c |   13 +++----------
 1 files changed, 3 insertions(+), 10 deletions(-)
---
diff --git a/src/wayland/meta-wayland-touch.c b/src/wayland/meta-wayland-touch.c
index 09fb2dc..221ba9b 100644
--- a/src/wayland/meta-wayland-touch.c
+++ b/src/wayland/meta-wayland-touch.c
@@ -202,18 +202,11 @@ touch_get_relative_coordinates (MetaWaylandTouch   *touch,
 
   clutter_event_get_coords (event, &event_x, &event_y);
 
-  if (surface->surface_actor)
-    {
-      clutter_actor_transform_stage_point (CLUTTER_ACTOR (surface->surface_actor),
-                                           event_x, event_y,
-                                           &event_x, &event_y);
-    }
-
-  *x = event_x / surface->scale;
-  *y = event_y / surface->scale;
+  return meta_wayland_surface_get_relative_coordinates (surface,
+                                                        event_x, event_y,
+                                                        x, y);
 }
 
-
 void
 meta_wayland_touch_update (MetaWaylandTouch   *touch,
                            const ClutterEvent *event)
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]