1 diff --git a/configure.ac b/configure.ac
2 index a018667..09c5d8d 100644
5 @@ -32,7 +32,7 @@ dnl protocol, so Xrandr version l.n.m corresponds to protocol version l.n
7 AC_INIT(libXrandr, 1.3.0, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], libXrandr)
9 -AM_INIT_AUTOMAKE([dist-bzip2])
10 +AM_INIT_AUTOMAKE([foreign dist-bzip2])
13 # Require xorg-macros: XORG_CWARNFLAGS, XORG_CHANGELOG
14 diff --git a/include/X11/extensions/Xrandr.h b/include/X11/extensions/Xrandr.h
15 index a411321..6b756a7 100644
16 --- a/include/X11/extensions/Xrandr.h
17 +++ b/include/X11/extensions/Xrandr.h
18 @@ -197,6 +197,7 @@ Time XRRTimes (Display *dpy, int screen, Time *config_timestamp);
20 /* Version 1.2 additions */
22 +/* despite returning a Status, this returns 1 for success */
24 XRRGetScreenSizeRange (Display *dpy, Window window,
25 int *minWidth, int *minHeight,
26 diff --git a/src/XrrConfig.c b/src/XrrConfig.c
27 index db7a1ae..34ff3ef 100644
30 @@ -409,6 +409,7 @@ Status XRRSetScreenConfigAndRate (Display *dpy,
32 (void) _XReply (dpy, (xReply *) &rep, 0, xTrue);
34 + /* actually .errorCode in struct xError */
35 if (rep.status == RRSetConfigSuccess) {
36 /* if we succeed, set our view of reality to what we set it to */
37 config->config_timestamp = rep.newConfigTimestamp;
38 diff --git a/src/XrrCrtc.c b/src/XrrCrtc.c
39 index db9d0b4..697987a 100644
42 @@ -167,7 +167,7 @@ XRRGetCrtcGammaSize (Display *dpy, RRCrtc crtc)
45 if (!_XReply (dpy, (xReply *) &rep, 0, xFalse))
46 - rep.status = RRSetConfigFailed;
51 @@ -179,7 +179,7 @@ XRRGetCrtcGamma (Display *dpy, RRCrtc crtc)
52 XExtDisplayInfo *info = XRRFindDisplay(dpy);
53 xRRGetCrtcGammaReply rep;
54 xRRGetCrtcGammaReq *req;
55 - XRRCrtcGamma *crtc_gamma;
56 + XRRCrtcGamma *crtc_gamma = NULL;
60 @@ -192,7 +192,7 @@ XRRGetCrtcGamma (Display *dpy, RRCrtc crtc)
63 if (!_XReply (dpy, (xReply *) &rep, 0, xFalse))
64 - rep.status = RRSetConfigFailed;
67 nbytes = (long) rep.length << 2;
69 @@ -204,9 +204,7 @@ XRRGetCrtcGamma (Display *dpy, RRCrtc crtc)
72 _XEatData (dpy, (unsigned long) nbytes);
73 - UnlockDisplay (dpy);
78 _XRead16 (dpy, crtc_gamma->red, rep.size * 2);
79 _XRead16 (dpy, crtc_gamma->green, rep.size * 2);
80 @@ -214,7 +212,8 @@ XRRGetCrtcGamma (Display *dpy, RRCrtc crtc)
82 if (nbytes > nbytesRead)
83 _XEatData (dpy, (unsigned long) (nbytes - nbytesRead));
90 diff --git a/src/XrrProperty.c b/src/XrrProperty.c
91 index 9554f9a..1a125b2 100644
92 --- a/src/XrrProperty.c
93 +++ b/src/XrrProperty.c
94 @@ -272,7 +272,7 @@ XRRGetOutputProperty (Display *dpy, RROutput output,
99 + return ((xError *)&rep)->errorCode;
102 *prop = (unsigned char *) NULL;