[gtk+] wayland: Add internal API to unset a touch implicit grab



commit 2c36dc759290436fea5b59f079287df96806a308
Author: Carlos Garnacho <carlosg gnome org>
Date:   Wed Aug 20 20:22:42 2014 +0200

    wayland: Add internal API to unset a touch implicit grab
    
    This removes both the wayland specific accounting, and the Gdk implicit
    grab tracking.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=731380

 gdk/wayland/gdkdevice-wayland.c  |   14 ++++++++++++++
 gdk/wayland/gdkprivate-wayland.h |    3 +++
 2 files changed, 17 insertions(+), 0 deletions(-)
---
diff --git a/gdk/wayland/gdkdevice-wayland.c b/gdk/wayland/gdkdevice-wayland.c
index 002b250..2ff888c 100644
--- a/gdk/wayland/gdkdevice-wayland.c
+++ b/gdk/wayland/gdkdevice-wayland.c
@@ -2158,3 +2158,17 @@ gdk_wayland_device_clear_selection_content (GdkDevice *gdk_device)
 
   return TRUE;
 }
+
+void
+gdk_wayland_device_unset_touch_grab (GdkDevice        *gdk_device,
+                                     GdkEventSequence *sequence)
+{
+  GdkWaylandDeviceData *device;
+
+  g_return_if_fail (GDK_IS_WAYLAND_DEVICE (gdk_device));
+  device = GDK_WAYLAND_DEVICE (gdk_device)->device;
+
+  gdk_wayland_device_remove_touch (device, GDK_EVENT_SEQUENCE_TO_SLOT (sequence));
+  _gdk_display_end_touch_grab (gdk_device_get_display (gdk_device),
+                               gdk_device, sequence);
+}
diff --git a/gdk/wayland/gdkprivate-wayland.h b/gdk/wayland/gdkprivate-wayland.h
index e1867f6..e56592e 100644
--- a/gdk/wayland/gdkprivate-wayland.h
+++ b/gdk/wayland/gdkprivate-wayland.h
@@ -148,6 +148,9 @@ uint32_t _gdk_wayland_device_get_implicit_grab_serial(GdkWaylandDevice *device,
 uint32_t _gdk_wayland_device_get_last_implicit_grab_serial (GdkWaylandDevice  *device,
                                                             GdkEventSequence **seqence);
 
+void gdk_wayland_device_unset_touch_grab (GdkDevice        *device,
+                                          GdkEventSequence *sequence);
+
 void     _gdk_wayland_display_deliver_event (GdkDisplay *display, GdkEvent *event);
 GSource *_gdk_wayland_display_event_source_new (GdkDisplay *display);
 void     _gdk_wayland_display_queue_events (GdkDisplay *display);


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