]> git.ipfire.org Git - people/ms/ipfire-3.x.git/blame - pkgs/libXrandr/patches/libXrandr-1.3.0-fixes.patch
Move packages to pkgs subdirectory.
[people/ms/ipfire-3.x.git] / pkgs / libXrandr / patches / libXrandr-1.3.0-fixes.patch
CommitLineData
32e46be1
SS
1diff --git a/configure.ac b/configure.ac
2index a018667..09c5d8d 100644
3--- a/configure.ac
4+++ b/configure.ac
5@@ -32,7 +32,7 @@ dnl protocol, so Xrandr version l.n.m corresponds to protocol version l.n
6 dnl
7 AC_INIT(libXrandr, 1.3.0, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], libXrandr)
8 AC_CONFIG_AUX_DIR(.)
9-AM_INIT_AUTOMAKE([dist-bzip2])
10+AM_INIT_AUTOMAKE([foreign dist-bzip2])
11 AM_MAINTAINER_MODE
12
13 # Require xorg-macros: XORG_CWARNFLAGS, XORG_CHANGELOG
14diff --git a/include/X11/extensions/Xrandr.h b/include/X11/extensions/Xrandr.h
15index 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);
19
20 /* Version 1.2 additions */
21
22+/* despite returning a Status, this returns 1 for success */
23 Status
24 XRRGetScreenSizeRange (Display *dpy, Window window,
25 int *minWidth, int *minHeight,
26diff --git a/src/XrrConfig.c b/src/XrrConfig.c
27index db7a1ae..34ff3ef 100644
28--- a/src/XrrConfig.c
29+++ b/src/XrrConfig.c
30@@ -409,6 +409,7 @@ Status XRRSetScreenConfigAndRate (Display *dpy,
31
32 (void) _XReply (dpy, (xReply *) &rep, 0, xTrue);
33
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;
38diff --git a/src/XrrCrtc.c b/src/XrrCrtc.c
39index db9d0b4..697987a 100644
40--- a/src/XrrCrtc.c
41+++ b/src/XrrCrtc.c
42@@ -167,7 +167,7 @@ XRRGetCrtcGammaSize (Display *dpy, RRCrtc crtc)
43 req->crtc = crtc;
44
45 if (!_XReply (dpy, (xReply *) &rep, 0, xFalse))
46- rep.status = RRSetConfigFailed;
47+ rep.size = 0;
48 UnlockDisplay (dpy);
49 SyncHandle ();
50 return rep.size;
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;
57 long nbytes;
58 long nbytesRead;
59
60@@ -192,7 +192,7 @@ XRRGetCrtcGamma (Display *dpy, RRCrtc crtc)
61 req->crtc = crtc;
62
63 if (!_XReply (dpy, (xReply *) &rep, 0, xFalse))
64- rep.status = RRSetConfigFailed;
65+ goto out;
66
67 nbytes = (long) rep.length << 2;
68
69@@ -204,9 +204,7 @@ XRRGetCrtcGamma (Display *dpy, RRCrtc crtc)
70 if (!crtc_gamma)
71 {
72 _XEatData (dpy, (unsigned long) nbytes);
73- UnlockDisplay (dpy);
74- SyncHandle ();
75- return NULL;
76+ goto out;
77 }
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)
81
82 if (nbytes > nbytesRead)
83 _XEatData (dpy, (unsigned long) (nbytes - nbytesRead));
84-
85+
86+out:
87 UnlockDisplay (dpy);
88 SyncHandle ();
89 return crtc_gamma;
90diff --git a/src/XrrProperty.c b/src/XrrProperty.c
91index 9554f9a..1a125b2 100644
92--- a/src/XrrProperty.c
93+++ b/src/XrrProperty.c
94@@ -272,7 +272,7 @@ XRRGetOutputProperty (Display *dpy, RROutput output,
95 {
96 UnlockDisplay (dpy);
97 SyncHandle ();
98- return 1;
99+ return ((xError *)&rep)->errorCode;
100 }
101
102 *prop = (unsigned char *) NULL;