~ubuntu-branches/ubuntu/precise/x11-utils/precise-updates

« back to all changes in this revision

Viewing changes to xev/xev.c

  • Committer: Bazaar Package Importer
  • Author(s): Julien Cristau
  • Date: 2011-02-09 20:34:01 UTC
  • mfrom: (3.1.5 sid)
  • Revision ID: james.westby@ubuntu.com-20110209203401-43knowb75duvo9td
Tags: 7.6+1
* Remove David Nusinow and Brice Goglin from Uploaders.  Thanks for your
  work!
* Drop Pre-Depends on x11-common.
* Bump Standards-Version to 3.9.1.
* Upload to unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* $XConsortium: xev.c,v 1.15 94/04/17 20:45:20 keith Exp $ */
2
1
/*
3
2
 
4
3
Copyright (c) 1988  X Consortium
28
27
from the X Consortium.
29
28
 
30
29
*/
31
 
/* $XFree86: xc/programs/xev/xev.c,v 1.13 2003/10/24 20:38:17 tsi Exp $ */
32
30
 
33
31
/*
34
32
 * Author:  Jim Fulton, MIT X Consortium
690
688
"    -bw pixels                          border width in pixels",
691
689
"    -bs {NotUseful,WhenMapped,Always}   backingstore attribute",
692
690
"    -id windowid                        use existing window",
 
691
"    -root                               use root window",
693
692
"    -s                                  set save-unders attribute",
694
693
"    -name string                        window name",
695
694
"    -rv                                 reverse video",
739
738
    int done;
740
739
    char *name = "Event Tester";
741
740
    Bool reverse = False;
 
741
    Bool use_root = False;
742
742
    unsigned long back, fore;
743
743
    XIM xim;
744
744
    XIMStyles *xim_styles;
793
793
                if (++i >= argc) usage ();
794
794
                name = argv[i];
795
795
                continue;
796
 
              case 'r':                 /* -rv */
797
 
                reverse = True;
 
796
              case 'r':
 
797
                switch (arg[2]) {
 
798
                  case 'o':             /* -root */
 
799
                    use_root = True;
 
800
                    continue;
 
801
                  case 'v':             /* -rv */
 
802
                    reverse = True;
 
803
                    continue;
 
804
                  default:
 
805
                    usage ();
 
806
                }
798
807
                continue;
799
808
              case 's':                 /* -s */
800
809
                attr.save_under = True;
865
874
                           FocusChangeMask | PropertyChangeMask |
866
875
                           ColormapChangeMask | OwnerGrabButtonMask;
867
876
 
 
877
    if (use_root)
 
878
        w = RootWindow(dpy, screen);
 
879
 
868
880
    if (w) {
869
881
        XGetWindowAttributes(dpy, w, &wattr);
870
882
        if (wattr.all_event_masks & ButtonPressMask)