[gtk/wip/matthiasc/popup5: 64/120] surface: Make gdk_surface_get_device_position void
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/matthiasc/popup5: 64/120] surface: Make gdk_surface_get_device_position void
- Date: Sun, 19 May 2019 20:24:22 +0000 (UTC)
commit cd25915f0e0c929cb8c0f7f622f76ec5c94552a0
Author: Matthias Clasen <mclasen redhat com>
Date: Fri Apr 19 15:39:23 2019 -0400
surface: Make gdk_surface_get_device_position void
None of the callers were using the return value,
and without child surfaces, it is not very useful.
gdk/gdksurface.c | 14 ++++----------
gdk/gdksurface.h | 10 +++++-----
2 files changed, 9 insertions(+), 15 deletions(-)
---
diff --git a/gdk/gdksurface.c b/gdk/gdksurface.c
index fe6d3757d8..030aec1de6 100644
--- a/gdk/gdksurface.c
+++ b/gdk/gdksurface.c
@@ -1491,12 +1491,8 @@ gdk_surface_constrain_size (GdkGeometry *geometry,
* Obtains the current device position in doubles and modifier state.
* The position is given in coordinates relative to the upper left
* corner of @surface.
- *
- * Returns: (nullable) (transfer none): The surface underneath @device
- * (as with gdk_device_get_surface_at_position()), or %NULL if the
- * surface is not known to GDK.
**/
-GdkSurface *
+void
gdk_surface_get_device_position (GdkSurface *surface,
GdkDevice *device,
double *x,
@@ -1506,9 +1502,9 @@ gdk_surface_get_device_position (GdkSurface *surface,
gdouble tmp_x, tmp_y;
GdkModifierType tmp_mask;
- g_return_val_if_fail (GDK_IS_SURFACE (surface), NULL);
- g_return_val_if_fail (GDK_IS_DEVICE (device), NULL);
- g_return_val_if_fail (gdk_device_get_source (device) != GDK_SOURCE_KEYBOARD, NULL);
+ g_return_if_fail (GDK_IS_SURFACE (surface));
+ g_return_if_fail (GDK_IS_DEVICE (device));
+ g_return_if_fail (gdk_device_get_source (device) != GDK_SOURCE_KEYBOARD);
tmp_x = tmp_y = 0;
tmp_mask = 0;
@@ -1523,8 +1519,6 @@ gdk_surface_get_device_position (GdkSurface *surface,
*y = tmp_y;
if (mask)
*mask = tmp_mask;
-
- return NULL;
}
static void
diff --git a/gdk/gdksurface.h b/gdk/gdksurface.h
index c39fc885b6..d64c63dd18 100644
--- a/gdk/gdksurface.h
+++ b/gdk/gdksurface.h
@@ -598,11 +598,11 @@ GDK_AVAILABLE_IN_ALL
gint gdk_surface_get_scale_factor (GdkSurface *surface);
GDK_AVAILABLE_IN_ALL
-GdkSurface * gdk_surface_get_device_position (GdkSurface *surface,
- GdkDevice *device,
- double *x,
- double *y,
- GdkModifierType *mask);
+void gdk_surface_get_device_position (GdkSurface *surface,
+ GdkDevice *device,
+ double *x,
+ double *y,
+ GdkModifierType *mask);
GDK_AVAILABLE_IN_ALL
void gdk_surface_set_icon_list (GdkSurface *surface,
GList *surfaces);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]