[gtk+] Remove the return value of GdkWindowImpl::get_root_coords



commit b922e0e213a30b823ced4349baa2a46578a2221c
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Thu Feb 27 20:58:13 2014 -0500

    Remove the return value of GdkWindowImpl::get_root_coords
    
    It's unused by callers, and the historical return values are
    undocumented, so just remove it now.

 gdk/broadway/gdkwindow-broadway.c |    4 +---
 gdk/gdkoffscreenwindow.c          |    4 +---
 gdk/gdkwindowimpl.h               |    2 +-
 gdk/quartz/gdkwindow-quartz.c     |    8 +++-----
 gdk/wayland/gdkwindow-wayland.c   |    4 +---
 gdk/win32/gdkwindow-win32.c       |    3 +--
 gdk/x11/gdkwindow-x11.c           |   17 +++++++----------
 7 files changed, 15 insertions(+), 27 deletions(-)
---
diff --git a/gdk/broadway/gdkwindow-broadway.c b/gdk/broadway/gdkwindow-broadway.c
index dae6ebf..fa541c8 100644
--- a/gdk/broadway/gdkwindow-broadway.c
+++ b/gdk/broadway/gdkwindow-broadway.c
@@ -707,7 +707,7 @@ gdk_window_broadway_get_geometry (GdkWindow *window,
 
 }
 
-static gint
+static void
 gdk_window_broadway_get_root_coords (GdkWindow *window,
                                     gint       x,
                                     gint       y,
@@ -722,8 +722,6 @@ gdk_window_broadway_get_root_coords (GdkWindow *window,
     *root_x = x + impl->wrapper->x;
   if (root_y)
     *root_y = y + impl->wrapper->y;
-
-  return 1;
 }
 
 static void
diff --git a/gdk/gdkoffscreenwindow.c b/gdk/gdkoffscreenwindow.c
index ead3dfa..a5a413b 100644
--- a/gdk/gdkoffscreenwindow.c
+++ b/gdk/gdkoffscreenwindow.c
@@ -243,7 +243,7 @@ to_embedder (GdkWindow *window,
                         NULL);
 }
 
-static gint
+static void
 gdk_offscreen_window_get_root_coords (GdkWindow *window,
                                      gint       x,
                                      gint       y,
@@ -275,8 +275,6 @@ gdk_offscreen_window_get_root_coords (GdkWindow *window,
     *root_x = tmpx;
   if (root_y)
     *root_y = tmpy;
-
-  return TRUE;
 }
 
 static gboolean
diff --git a/gdk/gdkwindowimpl.h b/gdk/gdkwindowimpl.h
index ed7d4c5..d8b0ff4 100644
--- a/gdk/gdkwindowimpl.h
+++ b/gdk/gdkwindowimpl.h
@@ -96,7 +96,7 @@ struct _GdkWindowImplClass
                                          gint            *y,
                                          gint            *width,
                                          gint            *height);
-  gint         (* get_root_coords)      (GdkWindow       *window,
+  void         (* get_root_coords)      (GdkWindow       *window,
                                         gint             x,
                                         gint             y,
                                          gint            *root_x,
diff --git a/gdk/quartz/gdkwindow-quartz.c b/gdk/quartz/gdkwindow-quartz.c
index 7baf8a3..cfa211a 100644
--- a/gdk/quartz/gdkwindow-quartz.c
+++ b/gdk/quartz/gdkwindow-quartz.c
@@ -1730,7 +1730,7 @@ gdk_window_quartz_get_geometry (GdkWindow *window,
     }
 }
 
-static gint
+static void
 gdk_window_quartz_get_root_coords (GdkWindow *window,
                                    gint       x,
                                    gint       y,
@@ -1749,7 +1749,7 @@ gdk_window_quartz_get_root_coords (GdkWindow *window,
       if (root_y)
        *root_y = 0;
       
-      return 0;
+      return;
     }
 
   if (window == _gdk_root)
@@ -1759,7 +1759,7 @@ gdk_window_quartz_get_root_coords (GdkWindow *window,
       if (root_y)
         *root_y = y;
 
-      return 1;
+      return;
     }
   
   toplevel = gdk_window_get_toplevel (window);
@@ -1789,8 +1789,6 @@ gdk_window_quartz_get_root_coords (GdkWindow *window,
     *root_x = tmp_x;
   if (root_y)
     *root_y = tmp_y;
-
-  return TRUE;
 }
 
 static void
diff --git a/gdk/wayland/gdkwindow-wayland.c b/gdk/wayland/gdkwindow-wayland.c
index 462f8db..c71cf53 100644
--- a/gdk/wayland/gdkwindow-wayland.c
+++ b/gdk/wayland/gdkwindow-wayland.c
@@ -1390,7 +1390,7 @@ gdk_wayland_window_offset (GdkWindow *window,
   *y_out = y_offset;
 }
 
-static gint
+static void
 gdk_window_wayland_get_root_coords (GdkWindow *window,
                                     gint       x,
                                     gint       y,
@@ -1406,8 +1406,6 @@ gdk_window_wayland_get_root_coords (GdkWindow *window,
 
   if (root_y)
     *root_y = y_offset + y;
-
-  return 1;
 }
 
 static gboolean
diff --git a/gdk/win32/gdkwindow-win32.c b/gdk/win32/gdkwindow-win32.c
index 72266e7..35a49b7 100644
--- a/gdk/win32/gdkwindow-win32.c
+++ b/gdk/win32/gdkwindow-win32.c
@@ -2020,7 +2020,7 @@ gdk_win32_window_get_geometry (GdkWindow *window,
     }
 }
 
-static gint
+static void
 gdk_win32_window_get_root_coords (GdkWindow *window,
                                  gint       x,
                                  gint       y,
@@ -2046,7 +2046,6 @@ gdk_win32_window_get_root_coords (GdkWindow *window,
                           GDK_WINDOW_HWND (window),
                           x, y,
                           tx + _gdk_offset_x, ty + _gdk_offset_y));
-  return 1;
 }
 
 static void
diff --git a/gdk/x11/gdkwindow-x11.c b/gdk/x11/gdkwindow-x11.c
index 337c82e..5696e95 100644
--- a/gdk/x11/gdkwindow-x11.c
+++ b/gdk/x11/gdkwindow-x11.c
@@ -3089,7 +3089,7 @@ gdk_window_x11_get_geometry (GdkWindow *window,
     }
 }
 
-static gint
+static void
 gdk_window_x11_get_root_coords (GdkWindow *window,
                                gint       x,
                                gint       y,
@@ -3097,23 +3097,20 @@ gdk_window_x11_get_root_coords (GdkWindow *window,
                                gint      *root_y)
 {
   GdkWindowImplX11 *impl = GDK_WINDOW_IMPL_X11 (window->impl);
-  gint return_val;
   Window child;
   gint tx;
   gint ty;
   
-  return_val = XTranslateCoordinates (GDK_WINDOW_XDISPLAY (window),
-                                     GDK_WINDOW_XID (window),
-                                     GDK_WINDOW_XROOTWIN (window),
-                                     x * impl->window_scale, y * impl->window_scale, &tx, &ty,
-                                     &child);
-  
+  XTranslateCoordinates (GDK_WINDOW_XDISPLAY (window),
+                         GDK_WINDOW_XID (window),
+                         GDK_WINDOW_XROOTWIN (window),
+                         x * impl->window_scale, y * impl->window_scale, &tx, &ty,
+                         &child);
+
   if (root_x)
     *root_x = tx / impl->window_scale;
   if (root_y)
     *root_y = ty / impl->window_scale;
-  
-  return return_val;
 }
 
 static void


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