6.3 Getting Window Information
X provides a utility named xwininfo for obtaining basic information about a window,
including its size, location, visibility, color depth, ID, and name.
When run without arguments, xwininfo permits you to interactively select the
window to be used:
$ xwininfo
xwininfo: Please select the window about which you
would like information by clicking the
mouse in that window.
...User selects a window with the mouse...
xwininfo: Window id: 0x363809e "chris@concord2:~"
Absolute upper-left X: 464
Absolute upper-left Y: 20
Relative upper-left X: 6
Relative upper-left Y: 20
6.3
98 Chapter 6: X Utility Programs
Width: 737
Height: 898
Depth: 24
Visual Class: TrueColor
Border width: 0
Class: InputOutput
Colormap: 0x20 (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: +464+20 -79+20 -79-106 +464-106
-geometry 80x58-73+0
I??™ve highlighted the most useful information in the output. Window id, on the first
line, can be used as an argument for other commands, such as xwd (Section 6.11).
Map State indicates whether the window is currently visible or not, and the last line
shows the geometry argument (Section 7.
Pages:
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173