rpms/libXrandr/devel randr-git.patch, NONE, 1.1 libXrandr.spec, 1.34, 1.35

Adam Jackson ajax at fedoraproject.org
Tue Nov 10 20:37:44 UTC 2009


Author: ajax

Update of /cvs/pkgs/rpms/libXrandr/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv4662

Modified Files:
	libXrandr.spec 
Added Files:
	randr-git.patch 
Log Message:
* Tue Nov 10 2009 Adam Jackson <ajax at redhat.com> 1.3.0-4
- randr-git.patch: Update to git


randr-git.patch:
 configure.ac                    |    2 +-
 include/X11/extensions/Xrandr.h |    1 +
 src/XrrConfig.c                 |    1 +
 src/XrrCrtc.c                   |   13 ++++++-------
 src/XrrProperty.c               |    2 +-
 5 files changed, 10 insertions(+), 9 deletions(-)

--- NEW FILE randr-git.patch ---
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;


Index: libXrandr.spec
===================================================================
RCS file: /cvs/pkgs/rpms/libXrandr/devel/libXrandr.spec,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -p -r1.34 -r1.35
--- libXrandr.spec	25 Jul 2009 05:14:41 -0000	1.34
+++ libXrandr.spec	10 Nov 2009 20:37:43 -0000	1.35
@@ -1,13 +1,14 @@
 Summary: X.Org X11 libXrandr runtime library
 Name: libXrandr
 Version: 1.3.0
-Release: 3%{?dist}
+Release: 4%{?dist}
 License: MIT
 Group: System Environment/Libraries
 URL: http://www.x.org
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 Source0: http://www.x.org/pub/individual/lib/%{name}-%{version}.tar.bz2
+Patch0: randr-git.patch
 
 BuildRequires: xorg-x11-proto-devel
 BuildRequires: pkgconfig(randrproto) >= 1.3.0
@@ -30,6 +31,7 @@ X.Org X11 libXrandr development package
 
 %prep
 %setup -q
+%patch0 -p1 -b .git
 
 %build
 %configure  --disable-static
@@ -63,6 +65,9 @@ rm -rf $RPM_BUILD_ROOT
 %{_mandir}/man3/*.3*
 
 %changelog
+* Tue Nov 10 2009 Adam Jackson <ajax at redhat.com> 1.3.0-4
+- randr-git.patch: Update to git
+
 * Fri Jul 24 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 1.3.0-3
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
 




More information about the fedora-extras-commits mailing list