Compare commits

...
Sign in to create a new pull request.

6 commits

Author SHA1 Message Date
Fedora Release Engineering
cb05093bbd dist-git conversion 2010-07-29 17:40:12 +00:00
Bill Nottingham
dc68d74a9a Fix typo that causes a failure to update the common directory. (releng
#2781)
2009-11-26 01:56:15 +00:00
Adam Jackson
a03a004319 - randr-git.patch: Update to git 2009-11-10 20:42:54 +00:00
Adam Jackson
21659538e8 - randr-git.patch: Update to git 2009-11-10 20:39:29 +00:00
Soren Sandmann Pedersen
3a69bbfe82 Require libXext-devel 2009-11-04 17:21:25 +00:00
Jesse Keating
61791d5d29 Initialize branch F-12 for libXrandr 2009-09-29 05:17:29 +00:00
4 changed files with 108 additions and 25 deletions

View file

View file

@ -1,21 +0,0 @@
# Makefile for source rpm: libXrandr
# $Id: Makefile,v 1.1 2005/08/26 21:35:29 mharris Exp $
NAME := libXrandr
SPECFILE = $(firstword $(wildcard *.spec))
define find-makefile-common
for d in common ../common ../../common ; do if [ -f $$d/Makefile.common ] ; then if [ -f $$d/CVS/Root -a -w $$/Makefile.common ] ; then cd $$d ; cvs -Q update ; fi ; echo "$$d/Makefile.common" ; break ; fi ; done
endef
MAKEFILE_COMMON := $(shell $(find-makefile-common))
ifeq ($(MAKEFILE_COMMON),)
# attempt a checkout
define checkout-makefile-common
test -f CVS/Root && { cvs -Q -d $$(cat CVS/Root) checkout common && echo "common/Makefile.common" ; } || { echo "ERROR: I can't figure out how to checkout the 'common' module." ; exit -1 ; } >&2
endef
MAKEFILE_COMMON := $(shell $(checkout-makefile-common))
endif
include $(MAKEFILE_COMMON)

View file

@ -1,13 +1,14 @@
Summary: X.Org X11 libXrandr runtime library
Name: libXrandr
Version: 1.3.0
Release: 3%{?dist}
Release: 5%{?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
@ -22,14 +23,12 @@ Summary: X.Org X11 libXrandr development package
Group: Development/Libraries
Requires: %{name} = %{version}-%{release}
Requires: pkgconfig
Requires: pkgconfig(randrproto) >= 1.2.1
%description devel
X.Org X11 libXrandr development package
%prep
%setup -q
%patch0 -p1 -b .git
%build
%configure --disable-static
@ -63,6 +62,9 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man3/*.3*
%changelog
* Tue Nov 10 2009 Adam Jackson <ajax@redhat.com> 1.3.0-5
- randr-git.patch: Update to git
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.3.0-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

102
randr-git.patch Normal file
View file

@ -0,0 +1,102 @@
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;