Stop defaulting to the root window in gdk_window_get_geometry
authorMatthias Clasen <mclasen@redhat.com>
Mon, 6 Nov 2017 00:29:49 +0000 (19:29 -0500)
committerMatthias Clasen <mclasen@redhat.com>
Mon, 6 Nov 2017 00:29:49 +0000 (19:29 -0500)
This function is not documented as accepting NULL for the
window, and we don't want to have the root window sneakily
appear in the api like this.

gdk/gdkwindow.c

index db2d851d55c277580c703b07a80565a0e2a4c221..729654de69736a4bd651e3bea9228144b4f8c67e 100644 (file)
@@ -4449,9 +4449,6 @@ gdk_window_get_geometry (GdkWindow *window,
   GdkWindow *parent;
   GdkWindowImplClass *impl_class;
 
-  if (!window)
-    window = gdk_display_get_root_window ((gdk_display_get_default ()));
-
   g_return_if_fail (GDK_IS_WINDOW (window));
 
   if (!GDK_WINDOW_DESTROYED (window))