[gtk/wip/otte/dnd: 14/22] device: Inline function into return_if_fail()



commit f9b7825a47ca3d29be91214ba2325c0851fe5465
Author: Benjamin Otte <otte redhat com>
Date:   Sat Feb 22 06:53:46 2020 +0100

    device: Inline function into return_if_fail()

 gdk/gdkdevice.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)
---
diff --git a/gdk/gdkdevice.c b/gdk/gdkdevice.c
index 55fbc48742..186738cf04 100644
--- a/gdk/gdkdevice.c
+++ b/gdk/gdkdevice.c
@@ -541,15 +541,10 @@ gdk_device_get_position (GdkDevice *device,
                          double    *x,
                          double    *y)
 {
-  GdkDisplay *display;
-
   g_return_if_fail (GDK_IS_DEVICE (device));
   g_return_if_fail (gdk_device_get_source (device) != GDK_SOURCE_KEYBOARD);
-
-  display = gdk_device_get_display (device);
-
   g_return_if_fail (gdk_device_get_device_type (device) != GDK_DEVICE_TYPE_SLAVE ||
-                    gdk_display_device_is_grabbed (display, device));
+                    gdk_display_device_is_grabbed (gdk_device_get_display (device), device));
 
   _gdk_device_query_state (device, NULL, NULL, x, y, NULL, NULL, NULL);
 }


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