Any of the return location arguments to this function may be %NULL,
if you aren’t interested in getting the value of that field.
The X and Y coordinates returned are relative to the parent window
of @window, which for toplevels usually means relative to the
window decorations (titlebar, etc.) rather than relative to the
root window (screen-size background window).
On the X11 platform, the geometry is obtained from the X server,
so reflects the latest position of @window; this may be out-of-sync
with the position of @window delivered in the most-recently-processed
#GdkEventConfigure. gdk_window_get_position() in contrast gets the
position from the most recent configure event.
Note: If @window is not a toplevel, it is much better
to call gdk_window_get_position(), gdk_window_get_width() and
gdk_window_get_height() instead, because it avoids the roundtrip to
the X server and because these functions support the full 32-bit
coordinate space, whereas gdk_window_get_geometry() is restricted to
the 16-bit coordinates of X11.
Any of the return location arguments to this function may be %NULL, if you aren’t interested in getting the value of that field.
The X and Y coordinates returned are relative to the parent window of @window, which for toplevels usually means relative to the window decorations (titlebar, etc.) rather than relative to the root window (screen-size background window).
On the X11 platform, the geometry is obtained from the X server, so reflects the latest position of @window; this may be out-of-sync with the position of @window delivered in the most-recently-processed #GdkEventConfigure. gdk_window_get_position() in contrast gets the position from the most recent configure event.
Note: If @window is not a toplevel, it is much better to call gdk_window_get_position(), gdk_window_get_width() and gdk_window_get_height() instead, because it avoids the roundtrip to the X server and because these functions support the full 32-bit coordinate space, whereas gdk_window_get_geometry() is restricted to the 16-bit coordinates of X11.