On Wed, Feb 16, 2011 at 04:00:25AM -0800, Michael Thayer wrote:
> Signed-off-by: Michael Thayer <michael.tha...@oracle.com>
> ---
> [Resending this as there were no responses the first time, but I don't
> know whether it was due to lack of interest or whether it just went down
> in the flood.]
> 
> I think the subject line says it all.  I was wanting to see what RandR events
> clients were getting and saw that this was on the X.Org todo list.
> 
>  configure.ac |    2 +-
>  xev.c        |  214 
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>  2 files changed, 215 insertions(+), 1 deletions(-)

[...]

> diff --git a/xev.c b/xev.c
> index c053171..667dc63 100644
> --- a/xev.c
> +++ b/xev.c

[...]

> @@ -935,6 +1124,20 @@ main (int argc, char **argv)
>          }
>      }
>  
> +    have_rr = XRRQueryExtension (dpy, &rr_event_base, &rr_error_base);
> +    if (have_rr) {
> +        int rr_major, rr_minor;
> +
> +        if (XRRQueryVersion (dpy, &rr_major, &rr_minor)) {
> +            int mask = RRScreenChangeNotifyMask;
> +
> +            if (rr_major >= 1 && rr_minor >= 2)

This check seems wrong, since it will include these event masks for RandR
version 2.2 but not 2.1 if we ever have a RandR 2.

> +                mask |= RRCrtcChangeNotifyMask | RROutputChangeNotifyMask |
> +                        RROutputPropertyNotifyMask;
> +            XRRSelectInput (dpy, w, mask);
> +        }
> +    }
> +
>      for (done = 0; !done; ) {
>       XEvent event;
_______________________________________________
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to