XGetGeometry() XGetGeometry()
Name
XGetGeometry - obtain the current geometry of drawable.
Synopsis
Status XGetGeometry(display, drawable, root_return, x_return, y_return, width_return, height_return, border_width_return, depth_return)
Display *display;
Drawable drawable;
Window *root_return;
int *x_return, *y_return;
unsigned int *width_return, *height_return;
unsigned int *border_width_return;
unsigned int *depth_return;
Arguments
display Specifies a connection to an X server; returned from XOpenDisplay().
drawable Specifies the drawable, either a window or a pixmap.
root_return Returns the root window ID of the specified window.
x_return Return the coordinates of the upper-left pixel of the window's border, relative to its parent's origin. For pixmaps, these
y_return coordinates are always zero.
width_returnReturn the dimensions of the drawable. For a window, these return the inside size (not including the border).
height_return
border_width_return
Returns the borderwidth, in pixels, of the window's border, if the drawable is a window. Returns zero if the drawable is a
pixmap.
depth_return
Returns the depth of the pixmap or window (bits per pixel for the object).
Returns
Zero on failure, non-zero on success.
Description
This function gets the current geometry of a drawable, plus the ID of the root window of the screen the window is on. It is legal to pass
to this function on InputOnly window.
XGetGeometry() returns a Status of zero on failure, or non-zero on success.
Errors
BadDrawable
See Also
XConfigureWindow(), XGetWindowAttributes(), XMoveResizeWindow(), XMoveWindow(), XResizeWindow().
Xlib - Window Attributes XGetGeometry()