[gtk+/xi2] Turn gdk_display_device_ungrab() into gdk_device_ungrab().



commit 44f11d7dc6b3c4994ecffd19eaeda54b75b31237
Author: Carlos Garnacho <carlos gnome org>
Date:   Mon Oct 19 02:41:36 2009 +0200

    Turn gdk_display_device_ungrab() into gdk_device_ungrab().
    
    This is for keeping things consistent with gdk_device_grab().

 gdk/gdk.h                |    3 +++
 gdk/gdk.symbols          |    8 +++++++-
 gdk/gdkdisplay.c         |    4 ++--
 gdk/gdkdisplay.h         |    3 ---
 gdk/x11/gdkdisplay-x11.c |   18 +++++++-----------
 5 files changed, 19 insertions(+), 17 deletions(-)
---
diff --git a/gdk/gdk.h b/gdk/gdk.h
index a2c3326..dff03c1 100644
--- a/gdk/gdk.h
+++ b/gdk/gdk.h
@@ -134,6 +134,9 @@ GdkGrabStatus gdk_device_grab        (GdkDevice        *device,
 				      GdkCursor        *cursor,
 				      guint32           time_);
 
+void          gdk_device_ungrab      (GdkDevice        *device,
+                                      guint32          time_);
+
 gboolean gdk_device_grab_info_libgtk_only (GdkDisplay  *display,
                                            GdkDevice   *device,
                                            GdkWindow  **grab_window,
diff --git a/gdk/gdk.symbols b/gdk/gdk.symbols
index 79682d7..c891eee 100644
--- a/gdk/gdk.symbols
+++ b/gdk/gdk.symbols
@@ -112,6 +112,7 @@ gdk_set_locale
 
 #if IN_HEADER(__GDK_H__)
 #if IN_FILE(__GDK_DISPLAY_X11_C__)
+gdk_device_ungrab
 gdk_display_list_devices
 gdk_event_send_client_message_for_display
 gdk_flush
@@ -187,6 +188,12 @@ gdk_keyboard_grab
 #endif
 #endif
 
+#if IN_HEADER(__GDK_H__)
+#if IN_FILE(__GDK_DEVICE_C__)
+gdk_device_grab
+#endif
+#endif
+
 #if IN_HEADER(__GDK_PROPERTY_H__)
 #if IN_FILE(__GDK_SELECTION_C__)
 gdk_string_to_compound_text
@@ -476,7 +483,6 @@ gdk_display_get_default_screen
 gdk_display_get_name
 gdk_display_get_n_screens
 gdk_display_get_screen
-gdk_display_device_ungrab
 gdk_display_open
 gdk_display_request_selection_notification
 gdk_display_store_clipboard
diff --git a/gdk/gdkdisplay.c b/gdk/gdkdisplay.c
index 91efc9c..e39e10e 100644
--- a/gdk/gdkdisplay.c
+++ b/gdk/gdkdisplay.c
@@ -437,7 +437,7 @@ gdk_display_pointer_ungrab (GdkDisplay *display,
       if (device->source != GDK_SOURCE_MOUSE)
         continue;
 
-      gdk_display_device_ungrab (display, device, time_);
+      gdk_device_ungrab (device, time_);
     }
 
   g_list_free (devices);
@@ -505,7 +505,7 @@ gdk_display_keyboard_ungrab (GdkDisplay *display,
       if (device->source != GDK_SOURCE_KEYBOARD)
         continue;
 
-      gdk_display_device_ungrab (display, device, time);
+      gdk_device_ungrab (device, time);
     }
 
   g_list_free (devices);
diff --git a/gdk/gdkdisplay.h b/gdk/gdkdisplay.h
index b8571ad..7b06f66 100644
--- a/gdk/gdkdisplay.h
+++ b/gdk/gdkdisplay.h
@@ -188,9 +188,6 @@ void        gdk_display_keyboard_ungrab    (GdkDisplay  *display,
 gboolean    gdk_display_pointer_is_grabbed (GdkDisplay  *display);
 #endif /* GDK_MULTIDEVICE_SAFE */
 
-void        gdk_display_device_ungrab      (GdkDisplay  *display,
-                                            GdkDevice   *device,
-                                            guint32      time_);
 gboolean    gdk_display_device_is_grabbed  (GdkDisplay  *display,
                                             GdkDevice   *device);
 void        gdk_display_beep               (GdkDisplay  *display);
diff --git a/gdk/x11/gdkdisplay-x11.c b/gdk/x11/gdkdisplay-x11.c
index decdd89..b2d10d9 100644
--- a/gdk/x11/gdkdisplay-x11.c
+++ b/gdk/x11/gdkdisplay-x11.c
@@ -1619,28 +1619,24 @@ device_ungrab_callback (GdkDisplay *display,
   )
 
 /**
- * gdk_display_pointer_ungrab:
- * @display: a #GdkDisplay.
+ * gdk_device_ungrab:
+ * @device: a #GdkDevice
  * @time_: a timestap (e.g. %GDK_CURRENT_TIME).
  *
- * Release any pointer grab.
- *
- * Since: 2.2
+ * Release any grab on @device.
  */
 void
-gdk_display_device_ungrab (GdkDisplay *display,
-                           GdkDevice  *device,
-                           guint32     time_)
+gdk_device_ungrab (GdkDevice  *device,
+                   guint32     time_)
 {
+  GdkDisplay *display;
   Display *xdisplay;
-  GdkDisplayX11 *display_x11;
   GdkDeviceGrabInfo *grab;
   unsigned long serial;
 
-  g_return_if_fail (GDK_IS_DISPLAY (display));
   g_return_if_fail (GDK_IS_DEVICE (device));
 
-  display_x11 = GDK_DISPLAY_X11 (display);
+  display = gdk_device_get_display (device);
   xdisplay = GDK_DISPLAY_XDISPLAY (display);
 
   serial = NextRequest (xdisplay);



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