diff options
author | Matthias Clasen <mclasen@redhat.com> | 2020-08-13 21:03:21 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2020-08-13 22:24:06 -0400 |
commit | 8a13d18655e337dc3c11860533e357c022b08b21 (patch) | |
tree | ea4f1be5a51fc32663a57e2dddfe14c9fd16b531 | |
parent | 9786185cc0fe7c2de64a5fbc25ec29879ab3f3ff (diff) | |
download | gtk+-8a13d18655e337dc3c11860533e357c022b08b21.tar.gz |
Drop gdk_device_get_position
Convert the last user to _gdk_device_query_state
and drop this unused internal api.
-rw-r--r-- | gdk/gdkdevice.c | 19 | ||||
-rw-r--r-- | gdk/gdkinternals.h | 3 | ||||
-rw-r--r-- | gdk/win32/gdkdrag-win32.c | 2 |
3 files changed, 1 insertions, 23 deletions
diff --git a/gdk/gdkdevice.c b/gdk/gdkdevice.c index a6a545656b..d812290b9f 100644 --- a/gdk/gdkdevice.c +++ b/gdk/gdkdevice.c @@ -476,25 +476,6 @@ gdk_device_get_property (GObject *object, } } -/* - * gdk_device_get_position: - * @device: pointer device to query status about. - * @x: (out): location to store root window X coordinate of @device - * @y: (out): location to store root window Y coordinate of @device - * - * Gets the current location of @device in double precision. - */ -void -gdk_device_get_position (GdkDevice *device, - double *x, - double *y) -{ - g_return_if_fail (GDK_IS_DEVICE (device)); - g_return_if_fail (device->source != GDK_SOURCE_KEYBOARD); - - _gdk_device_query_state (device, NULL, NULL, x, y, NULL); -} - /** * gdk_device_get_surface_at_position: * @device: pointer #GdkDevice to query info to. diff --git a/gdk/gdkinternals.h b/gdk/gdkinternals.h index f0a7f6916a..62e7783cbc 100644 --- a/gdk/gdkinternals.h +++ b/gdk/gdkinternals.h @@ -265,9 +265,6 @@ GdkGrabStatus gdk_device_grab (GdkDevice *device, guint32 time_); void gdk_device_ungrab (GdkDevice *device, guint32 time_); -void gdk_device_get_position (GdkDevice *device, - double *x, - double *y); int gdk_device_get_n_axes (GdkDevice *device); gboolean gdk_device_get_axis (GdkDevice *device, double *axes, diff --git a/gdk/win32/gdkdrag-win32.c b/gdk/win32/gdkdrag-win32.c index 9bb6f91539..73b0933077 100644 --- a/gdk/win32/gdkdrag-win32.c +++ b/gdk/win32/gdkdrag-win32.c @@ -1730,7 +1730,7 @@ _gdk_win32_surface_drag_begin (GdkSurface *surface, GDK_NOTE (DND, g_print ("_gdk_win32_surface_drag_begin\n")); - gdk_device_get_position (device, &px, &py); + _gdk_device_query_state (device, NULL, NULL, &px, &py, NULL); x_root = round (px + dx); y_root = round (py + dy); |