diff options
author | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2010-10-31 19:21:26 +0000 |
---|---|---|
committer | Matthieu Herrb <matthieu@cvs.openbsd.org> | 2010-10-31 19:21:26 +0000 |
commit | b185071e11d62c0501b5a04e5539d9ea35d091e3 (patch) | |
tree | 8531f7a17762a3d05b5d88ea0090fcc45fe1d39b /app/xev/xev.c | |
parent | 37f232bda9f394eb9f9c3b6036b7b1f92ed51e3e (diff) |
Update to xev 1.1.0
Diffstat (limited to 'app/xev/xev.c')
-rw-r--r-- | app/xev/xev.c | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/app/xev/xev.c b/app/xev/xev.c index 16d45aa02..c05317145 100644 --- a/app/xev/xev.c +++ b/app/xev/xev.c @@ -1,4 +1,3 @@ -/* $XConsortium: xev.c,v 1.15 94/04/17 20:45:20 keith Exp $ */ /* Copyright (c) 1988 X Consortium @@ -28,7 +27,6 @@ other dealings in this Software without prior written authorization from the X Consortium. */ -/* $XFree86: xc/programs/xev/xev.c,v 1.13 2003/10/24 20:38:17 tsi Exp $ */ /* * Author: Jim Fulton, MIT X Consortium @@ -690,6 +688,7 @@ usage (void) " -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", @@ -739,6 +738,7 @@ main (int argc, char **argv) int done; char *name = "Event Tester"; Bool reverse = False; + Bool use_root = False; unsigned long back, fore; XIM xim; XIMStyles *xim_styles; @@ -793,8 +793,17 @@ main (int argc, char **argv) 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; @@ -865,6 +874,9 @@ main (int argc, char **argv) FocusChangeMask | PropertyChangeMask | ColormapChangeMask | OwnerGrabButtonMask; + if (use_root) + w = RootWindow(dpy, screen); + if (w) { XGetWindowAttributes(dpy, w, &wattr); if (wattr.all_event_masks & ButtonPressMask) |