libXrandr: Update to 1.4.0.

This is a major update to the latest stable version.
This commit is contained in:
Stefan Schantl 2013-02-03 22:10:32 +01:00
parent a8a70bcd9d
commit f67d2be957
2 changed files with 2 additions and 106 deletions

View File

@ -4,7 +4,7 @@
###############################################################################
name = libXrandr
version = 1.3.0
version = 1.4.0
release = 1
maintainer = Stefan Schantl <stefan.schantl@ipfire.org>
@ -17,8 +17,7 @@ description
X.Org X11 libXrandr runtime library.
end
source_dl =
sources = %{thisapp}.tar.bz2
source_dl = http://ftp.x.org/pub/individual/lib/
build
requires
@ -35,7 +34,6 @@ end
packages
package %{name}
end
package %{name}-devel
template DEVEL

View File

@ -1,102 +0,0 @@
diff --git a/configure.ac b/configure.ac
index a018667..09c5d8d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -32,7 +32,7 @@ dnl protocol, so Xrandr version l.n.m corresponds to protocol version l.n
dnl
AC_INIT(libXrandr, 1.3.0, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], libXrandr)
AC_CONFIG_AUX_DIR(.)
-AM_INIT_AUTOMAKE([dist-bzip2])
+AM_INIT_AUTOMAKE([foreign dist-bzip2])
AM_MAINTAINER_MODE
# Require xorg-macros: XORG_CWARNFLAGS, XORG_CHANGELOG
diff --git a/include/X11/extensions/Xrandr.h b/include/X11/extensions/Xrandr.h
index a411321..6b756a7 100644
--- a/include/X11/extensions/Xrandr.h
+++ b/include/X11/extensions/Xrandr.h
@@ -197,6 +197,7 @@ Time XRRTimes (Display *dpy, int screen, Time *config_timestamp);
/* Version 1.2 additions */
+/* despite returning a Status, this returns 1 for success */
Status
XRRGetScreenSizeRange (Display *dpy, Window window,
int *minWidth, int *minHeight,
diff --git a/src/XrrConfig.c b/src/XrrConfig.c
index db7a1ae..34ff3ef 100644
--- a/src/XrrConfig.c
+++ b/src/XrrConfig.c
@@ -409,6 +409,7 @@ Status XRRSetScreenConfigAndRate (Display *dpy,
(void) _XReply (dpy, (xReply *) &rep, 0, xTrue);
+ /* actually .errorCode in struct xError */
if (rep.status == RRSetConfigSuccess) {
/* if we succeed, set our view of reality to what we set it to */
config->config_timestamp = rep.newConfigTimestamp;
diff --git a/src/XrrCrtc.c b/src/XrrCrtc.c
index db9d0b4..697987a 100644
--- a/src/XrrCrtc.c
+++ b/src/XrrCrtc.c
@@ -167,7 +167,7 @@ XRRGetCrtcGammaSize (Display *dpy, RRCrtc crtc)
req->crtc = crtc;
if (!_XReply (dpy, (xReply *) &rep, 0, xFalse))
- rep.status = RRSetConfigFailed;
+ rep.size = 0;
UnlockDisplay (dpy);
SyncHandle ();
return rep.size;
@@ -179,7 +179,7 @@ XRRGetCrtcGamma (Display *dpy, RRCrtc crtc)
XExtDisplayInfo *info = XRRFindDisplay(dpy);
xRRGetCrtcGammaReply rep;
xRRGetCrtcGammaReq *req;
- XRRCrtcGamma *crtc_gamma;
+ XRRCrtcGamma *crtc_gamma = NULL;
long nbytes;
long nbytesRead;
@@ -192,7 +192,7 @@ XRRGetCrtcGamma (Display *dpy, RRCrtc crtc)
req->crtc = crtc;
if (!_XReply (dpy, (xReply *) &rep, 0, xFalse))
- rep.status = RRSetConfigFailed;
+ goto out;
nbytes = (long) rep.length << 2;
@@ -204,9 +204,7 @@ XRRGetCrtcGamma (Display *dpy, RRCrtc crtc)
if (!crtc_gamma)
{
_XEatData (dpy, (unsigned long) nbytes);
- UnlockDisplay (dpy);
- SyncHandle ();
- return NULL;
+ goto out;
}
_XRead16 (dpy, crtc_gamma->red, rep.size * 2);
_XRead16 (dpy, crtc_gamma->green, rep.size * 2);
@@ -214,7 +212,8 @@ XRRGetCrtcGamma (Display *dpy, RRCrtc crtc)
if (nbytes > nbytesRead)
_XEatData (dpy, (unsigned long) (nbytes - nbytesRead));
-
+
+out:
UnlockDisplay (dpy);
SyncHandle ();
return crtc_gamma;
diff --git a/src/XrrProperty.c b/src/XrrProperty.c
index 9554f9a..1a125b2 100644
--- a/src/XrrProperty.c
+++ b/src/XrrProperty.c
@@ -272,7 +272,7 @@ XRRGetOutputProperty (Display *dpy, RROutput output,
{
UnlockDisplay (dpy);
SyncHandle ();
- return 1;
+ return ((xError *)&rep)->errorCode;
}
*prop = (unsigned char *) NULL;