xwininfo - window information utility for X


xwininfo [-all] [-bits] [-children] [-display display]
		 [-english] [-events] [-frame] [-help] [-id id]
		 [-int] [-metric] [-name name] [-root] [-shape]
		 [-size] [-stats] [-tree] [-wm]


The xwininfo(1) utility displays information about windows. Various types of information can be displayed, depending on which options are selected. If no options are chosen, -stats is assumed.

The user has the option of selecting the target window with the mouse (by clicking any mouse button in the desired window) or by specifying its window identifier (id) on the command line with the -id option. Instead of specifying the window by its id number, you can use the -name option to specify the window you want by name. There is also a special -root option to quickly obtain information on the screen's root window.


Display all information possible.
Display various attributes pertaining to the selected window's raw bits and how the selected window is to be stored. Displayed information includes the selected window's bit gravity, window gravity, backing-store hint, backing-planes value, backing pixel, and whether or not the window has save-under set.
Display the root, parent, and children windows' ids and names of the selected window.
-display display
Connect to specified server. See X(5).
Display all individual height, width, and x and y positions in inches (and feet, yards, and miles if necessary), as well as number of pixels. The -metric and -english options can both be enabled at the same time.
Display the selected window's event masks. Both the event mask of events wanted by some client and the event mask of events not to propagate are displayed.
Consider window manager frames when manually selecting windows.
Print out the 'Usage:' command syntax summary.
-id id
Specify target window id on the command line rather than using the mouse to select the target window. This is very useful in debugging X applications where the target window is not mapped to the screen, or where the use of the mouse might be impossible or interfere with the application.
Display all X window identifiers as integer decimal values. The default is to display them as hexadecimal values.
Display all individual height, width, and x and y positions in millimeters as well as number of pixels, based on what the server thinks the resolution is. Geometry specifications that are in +x+y form are not changed.
-name name
Specify the window named name as the target window on the command line rather than using the mouse to select the target window.
Use the root window as the target window. This is useful in situations where the root window is completely obscured.
Display the window and border shape extents of the selected window.
Display the selected window's sizing hints. Displayed information includes: for both the normal size hints and the zoom size hints; the user supplied location, if any; the program supplied location, if any; the user supplied size, if any; the program supplied size, if any; the minimum size, if any; the maximum size, if any; the resize increments, if any; and the minimum and maximum aspect ratios, if any.
Display various attributes pertaining to the location and appearance of the selected window. Information displayed includes the location of the window; its width and height; its depth, border width, class, and colormap id, if any; map state; backing-store hint; and location of the corners.
Like -children, but displays all children recursively.
Display the selected window's window manager hints. Information displayed can include whether or not the application accepts input, the window's icon window # and name, where the window's icon should go, and what the window's initial state should be.


The following is a sample summary taken with no options specified:

xwininfo: Window id: 0x60000f "xterm"
  Absolute upper-left X: 2
  Absolute upper-left Y: 85
  Relative upper-left X:  0
  Relative upper-left Y:  25
  Width: 579
  Height: 316
  Depth: 8
  Visual Class: PseudoColor
  Border width: 0
  Class: InputOutput
  Colormap: 0x27 (installed)
  Bit Gravity State: NorthWestGravity
  Window Gravity State: NorthWestGravity
  Backing Store State: NotUseful
  Save Under State: no
  Map State: IsViewable
  Override Redirect State: no
  Corners:  +2+85  -699+85  -699-623  +2-623
  -geometry 80x24+0+58


Contains the default host and display number.


Using -stats -bits shows some redundant information.

The -geometry string displayed must make assumptions about the window's border width and the behavior of the application and the window manager. As a result, the location given is not always correct.