[mutter] wayland/touch: Use helper for getting the next event serial



commit 5306d36522a45e8657231ac85f030bb4152ad29d
Author: Jonas Ådahl <jadahl gmail com>
Date:   Tue Oct 11 22:31:26 2016 +0800

    wayland/touch: Use helper for getting the next event serial
    
    https://bugzilla.gnome.org/show_bug.cgi?id=771646

 src/wayland/meta-wayland-touch.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/src/wayland/meta-wayland-touch.c b/src/wayland/meta-wayland-touch.c
index 78df0a7..09fb2dc 100644
--- a/src/wayland/meta-wayland-touch.c
+++ b/src/wayland/meta-wayland-touch.c
@@ -249,11 +249,10 @@ meta_wayland_touch_update (MetaWaylandTouch   *touch,
   if (event->type == CLUTTER_TOUCH_BEGIN ||
       event->type == CLUTTER_TOUCH_END)
     {
-      MetaWaylandSurface *surface = touch_info->touch_surface->surface;
-      struct wl_client *client = wl_resource_get_client (surface->resource);
-      struct wl_display *display = wl_client_get_display (client);
+      MetaWaylandInputDevice *input_device = META_WAYLAND_INPUT_DEVICE (touch);
 
-      touch_info->slot_serial = wl_display_get_serial (display);
+      touch_info->slot_serial =
+        meta_wayland_input_device_next_serial (input_device);
     }
 
   touch_get_relative_coordinates (touch, touch_info->touch_surface->surface,


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