diff options
author | Julien Cristau <jcristau@debian.org> | 2010-10-12 21:20:18 +0200 |
---|---|---|
committer | Julien Cristau <jcristau@debian.org> | 2010-10-13 10:34:42 +0200 |
commit | c7b90939f0ffcad17a5cc6cf1e28f7b027feeba5 (patch) | |
tree | da87f9c4de60518bd22bab72e085ae83530c9af3 | |
parent | 051f912f1c009a2c318214e6b3e86fa5f576d0ff (diff) |
Call QueryExtension before any other RandR function (bug#30806)
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Tested-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Signed-off-by: Julien Cristau <jcristau@debian.org>
-rw-r--r-- | xrandr.c | 5 |
1 files changed, 2 insertions, 3 deletions
@@ -2679,7 +2679,8 @@ main (int argc, char **argv) root = RootWindow (dpy, screen); - if (!XRRQueryVersion (dpy, &major, &minor)) + if (!XRRQueryExtension (dpy, &event_base, &error_base) || + !XRRQueryVersion (dpy, &major, &minor)) { fprintf (stderr, "RandR extension missing\n"); exit (1); @@ -3372,8 +3373,6 @@ main (int argc, char **argv) root, (SizeID) size, (Rotation) (rotation | reflection), rate, CurrentTime); - XRRQueryExtension(dpy, &event_base, &error_base); - if (setit && !dryrun && status == RRSetConfigFailed) { printf ("Failed to change the screen configuration!\n"); ret = 1; |