" -bw pixels border width in pixels",
" -bs {NotUseful,WhenMapped,Always} backingstore attribute",
" -id windowid use existing window",
+" -root use root window",
" -s set save-unders attribute",
" -name string window name",
" -rv reverse video",
int done;
char *name = "Event Tester";
Bool reverse = False;
+ Bool use_root = False;
unsigned long back, fore;
XIM xim;
XIMStyles *xim_styles;
if (++i >= argc) usage ();
name = argv[i];
continue;
- case 'r': /* -rv */
- reverse = True;
+ case 'r':
+ switch (arg[2]) {
+ case 'o': /* -root */
+ use_root = True;
+ continue;
+ case 'v': /* -rv */
+ reverse = True;
+ continue;
+ default:
+ usage ();
+ }
continue;
case 's': /* -s */
attr.save_under = True;
FocusChangeMask | PropertyChangeMask |
ColormapChangeMask | OwnerGrabButtonMask;
+ if (use_root)
+ w = RootWindow(dpy, screen);
+
if (w) {
XGetWindowAttributes(dpy, w, &wattr);
if (wattr.all_event_masks & ButtonPressMask)
.B "xev"
[\-display \fIdisplayname\fP] [\-geometry \fIgeom\fP]
[\-bw \fIpixels\fP] [\-bs \fI{NotUseful,WhenMapped,Always}\fP]
-[\-id \fIwindowid\fP] [\-s] [\-name \fIstring\fP] [\-rv]
+[\-id \fIwindowid\fP] [\-root] [\-s] [\-name \fIstring\fP] [\-rv]
.SH DESCRIPTION
.PP
\fIXev\fP creates a window and then asks the X server to send it
This option specifies that the window with the given id should be
monitored, instead of creating a new window.
.TP 8
+.B \-root
+This option specifies that the root window should be
+monitored, instead of creating a new window.
+.TP 8
.B \-s
This option specifies that save-unders should be enabled on the window. Save
unders are similar to backing store, but they refer rather to the saving of