[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

libxrandr: Changes to 'upstream-unstable'



 .gitignore                      |    9 +
 Makefile.am                     |    8 -
 README                          |   25 +++
 configure.ac                    |   15 +-
 include/X11/extensions/Xrandr.h |   74 +++++++++-
 man/.gitignore                  |    3 
 src/.gitignore                  |    7 
 src/Makefile.am                 |    6 
 src/Xrandr.c                    |   38 +++--
 src/Xrandrint.h                 |   11 -
 src/XrrConfig.c                 |    2 
 src/XrrCrtc.c                   |  294 +++++++++++++++++++++++++++++++++++++++-
 src/XrrMode.c                   |    3 
 src/XrrOutput.c                 |   64 ++++++++
 src/XrrProperty.c               |   18 --
 src/XrrScreen.c                 |   25 ++-
 16 files changed, 525 insertions(+), 77 deletions(-)

New commits:
commit e3036766916d55d0c8ae72d5752fd1699ae7390d
Author: Matthias Hopf <mhopf@suse.de>
Date:   Fri Mar 6 15:13:56 2009 +0100

    Bump to 1.3.0

diff --git a/configure.ac b/configure.ac
index a8a4bfa..a018667 100644
--- a/configure.ac
+++ b/configure.ac
@@ -30,7 +30,7 @@ dnl try to keep these the same.  Note that the library has an extra
 dnl digit in the version number to track changes which don't affect the
 dnl protocol, so Xrandr version l.n.m corresponds to protocol version l.n
 dnl
-AC_INIT(libXrandr, 1.2.99.4, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], libXrandr)
+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_MAINTAINER_MODE

commit 6bf8648e7e408be7a869fd4c4527a4fd73fc687d
Author: Alan Coopersmith <alan.coopersmith@sun.com>
Date:   Mon Feb 2 20:34:36 2009 -0800

    Add README with pointers to mailing list, bugzilla & git repos
    
    Signed-off-by: Alan Coopersmith <alan.coopersmith@sun.com>

diff --git a/README b/README
index e69de29..b035b8b 100644
--- a/README
+++ b/README
@@ -0,0 +1,25 @@
+libXrandr - X Resize, Rotate and Reflection extension library
+
+All questions regarding this software should be directed at the
+Xorg mailing list:
+
+        http://lists.freedesktop.org/mailman/listinfo/xorg
+
+Please submit bug reports to the Xorg bugzilla:
+
+        https://bugs.freedesktop.org/enter_bug.cgi?product=xorg
+
+The master development code repository can be found at:
+
+        git://anongit.freedesktop.org/git/xorg/lib/libXrandr
+
+        http://cgit.freedesktop.org/xorg/lib/libXrandr
+
+For patch submission instructions, see:
+
+	http://www.x.org/wiki/Development/Documentation/SubmittingPatches
+
+For more information on the git code manager, see:
+
+        http://wiki.x.org/wiki/GitPage
+

commit 70d641c6d170cda44856579dfdcb42d3bb1f8221
Author: Keith Packard <keithp@keithp.com>
Date:   Fri Jan 30 20:12:43 2009 -0800

    Send X_RRGetOutputPrimary when making an X_RRGetOutputPrimary request
    
    Using X_RRGetOutputProperty does not yield success here.
    
    Signed-off-by: Keith Packard <keithp@keithp.com>

diff --git a/src/XrrOutput.c b/src/XrrOutput.c
index 0c39a31..18863bd 100644
--- a/src/XrrOutput.c
+++ b/src/XrrOutput.c
@@ -176,7 +176,7 @@ XRRGetOutputPrimary(Display *dpy, Window window)
     LockDisplay(dpy);
     GetReq (RRGetOutputPrimary, req);
     req->reqType	= info->codes->major_opcode;
-    req->randrReqType	= X_RRGetOutputProperty;
+    req->randrReqType	= X_RRGetOutputPrimary;
     req->window		= window;
 
     if (!_XReply (dpy, (xReply *) &rep, 0, xFalse))

commit bf284b043d4c5688da2207647126b095f8c2b0cd
Author: Paulo Cesar Pereira de Andrade <pcpa@mandriva.com.br>
Date:   Fri Jan 30 16:38:03 2009 -0200

    Janitor: make distcheck, compiler warnings, .gitignore
    
      Warning corrections are either unused symbols or using an
    integer as a pointer (generated by sparse).

diff --git a/.gitignore b/.gitignore
index a8f6f22..dceb0f3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,5 @@
+.deps
+.libs
 aclocal.m4
 autom4te.cache
 compile
@@ -19,3 +21,10 @@ mkinstalldirs
 stamp-h1
 xrandr.pc
 *~
+*.3
+*.o
+*.la
+*.lo
+libXrandr-*.tar.*
+ChangeLog
+tags
diff --git a/Makefile.am b/Makefile.am
index bef1d41..9dc4b53 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -21,19 +21,15 @@
 
 SUBDIRS = src man 
 
-AM_CFLAGS = $(RANDR_CFLAGS) $(X_CFLAGS)
-
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = xrandr.pc
 
-EXTRA_DIST = xrandr.pc.in autogen.sh
-
-EXTRA_DIST += ChangeLog
+EXTRA_DIST = xrandr.pc.in ChangeLog
 MAINTAINERCLEANFILES = ChangeLog
 
 .PHONY: ChangeLog
 
 ChangeLog:
-	(GIT_DIR=$(top_srcdir)/.git git-log > .changelog.tmp && mv .changelog.tmp ChangeLog; rm -f .changelog.tmp) || (touch ChangeLog; echo 'git directory not found: installing possibly empty changelog.' >&2)
+	$(CHANGELOG_CMD)
 
 dist-hook: ChangeLog
diff --git a/configure.ac b/configure.ac
index d086cde..a8a4bfa 100644
--- a/configure.ac
+++ b/configure.ac
@@ -35,29 +35,30 @@ AC_CONFIG_AUX_DIR(.)
 AM_INIT_AUTOMAKE([dist-bzip2])
 AM_MAINTAINER_MODE
 
+# Require xorg-macros: XORG_CWARNFLAGS, XORG_CHANGELOG
+m4_ifndef([XORG_MACROS_VERSION], [AC_FATAL([must install xorg-macros 1.2 or later before running autoconf/autogen])])
+XORG_MACROS_VERSION(1.2)
 AM_CONFIG_HEADER(config.h)
 
 # Check for progs
 AC_PROG_CC
 AC_PROG_LIBTOOL
-
-# Check for X
-PKG_CHECK_MODULES(X, x11)
-AC_SUBST(X_CFLAGS)
-AC_SUBST(X_LIBS)
+XORG_CWARNFLAGS
 		  
 # Check randr configuration, strip extra digits from package version to
 # find the required protocol version
 
 RANDR_VERSION=[`echo $VERSION | sed 's/^\([0-9][0-9]*\.[0-9][0-9]*\).*$/\1/'`]
 AC_SUBST(RANDR_VERSION)
-PKG_CHECK_MODULES(RANDR, randrproto >= $RANDR_VERSION xext xextproto xrender renderproto)
+PKG_CHECK_MODULES(RANDR, x11 randrproto >= $RANDR_VERSION xext xextproto xrender renderproto)
+RANDR_CFLAGS="$CWARNFLAGS $RANDR_CFLAGS"
 AC_SUBST(RANDR_CFLAGS)
 AC_SUBST(RANDR_LIBS)
 
 XORG_CHECK_MALLOC_ZERO
 XORG_MANPAGE_SECTIONS
 XORG_RELEASE_VERSION
+XORG_CHANGELOG
 
 AC_OUTPUT([Makefile
 	   src/Makefile
diff --git a/man/.gitignore b/man/.gitignore
deleted file mode 100644
index 2d0f344..0000000
--- a/man/.gitignore
+++ /dev/null
@@ -1,3 +0,0 @@
-Makefile
-Makefile.in
-*.3*
diff --git a/src/.gitignore b/src/.gitignore
deleted file mode 100644
index 00409a0..0000000
--- a/src/.gitignore
+++ /dev/null
@@ -1,7 +0,0 @@
-.deps
-.libs
-libXrandr.la
-*.lo
-*.o
-Makefile
-Makefile.in
diff --git a/src/Makefile.am b/src/Makefile.am
index 57aa59c..ab7e778 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -10,8 +10,8 @@ libXrandr_la_SOURCES = 	\
 	XrrProperty.c	\
 	XrrScreen.c
 
-libXrandr_la_LIBADD = @X_LIBS@ @RANDR_LIBS@
-AM_CFLAGS = @X_CFLAGS@ @RANDR_CFLAGS@ @MALLOC_ZERO_CFLAGS@
+libXrandr_la_LIBADD = @RANDR_LIBS@
+AM_CFLAGS = @RANDR_CFLAGS@ @MALLOC_ZERO_CFLAGS@
 
 INCLUDES = -I$(top_srcdir)/include/X11/extensions
 
diff --git a/src/Xrandr.c b/src/Xrandr.c
index c923e0f..8ab1eae 100644
--- a/src/Xrandr.c
+++ b/src/Xrandr.c
@@ -232,7 +232,7 @@ XRRFindDisplay (Display *dpy)
 	dpyinfo = XextAddDisplay (&XRRExtensionInfo, dpy, 
 				  XRRExtensionName,
 				  &rr_extension_hooks,
-				  RRNumberEvents, 0);
+				  RRNumberEvents, NULL);
 	numscreens = ScreenCount(dpy);
 	xrri = Xmalloc (sizeof(XRandRInfo) + 
 				 sizeof(char *) * numscreens);
diff --git a/src/XrrConfig.c b/src/XrrConfig.c
index 7784227..db7a1ae 100644
--- a/src/XrrConfig.c
+++ b/src/XrrConfig.c
@@ -69,7 +69,7 @@ short *XRRConfigRates (XRRScreenConfiguration *config, int sizeID, int *nrates)
     if (!nents)
     {
 	*nrates = 0;
-	return 0;
+	return NULL;
     }
     *nrates = (int) *r;
     return r + 1;
diff --git a/src/XrrCrtc.c b/src/XrrCrtc.c
index 91b1671..db9d0b4 100644
--- a/src/XrrCrtc.c
+++ b/src/XrrCrtc.c
@@ -39,10 +39,9 @@ XRRGetCrtcInfo (Display *dpy, XRRScreenResources *resources, RRCrtc crtc)
     xRRGetCrtcInfoReply	    rep;
     xRRGetCrtcInfoReq	    *req;
     int			    nbytes, nbytesRead, rbytes;
-    int			    i;
     XRRCrtcInfo		    *xci;
 
-    RRCheckExtension (dpy, info, 0);
+    RRCheckExtension (dpy, info, NULL);
 
     LockDisplay (dpy);
     GetReq (RRGetCrtcInfo, req);
@@ -128,7 +127,6 @@ XRRSetCrtcConfig (Display *dpy,
     XExtDisplayInfo	    *info = XRRFindDisplay(dpy);
     xRRSetCrtcConfigReply   rep;
     xRRSetCrtcConfigReq	    *req;
-    int			    i;
 
     RRCheckExtension (dpy, info, 0);
 
@@ -159,7 +157,6 @@ XRRGetCrtcGammaSize (Display *dpy, RRCrtc crtc)
     XExtDisplayInfo		*info = XRRFindDisplay(dpy);
     xRRGetCrtcGammaSizeReply	rep;
     xRRGetCrtcGammaSizeReq	*req;
-    int				i;
 
     RRCheckExtension (dpy, info, 0);
 
@@ -182,12 +179,11 @@ XRRGetCrtcGamma (Display *dpy, RRCrtc crtc)
     XExtDisplayInfo	    *info = XRRFindDisplay(dpy);
     xRRGetCrtcGammaReply    rep;
     xRRGetCrtcGammaReq	    *req;
-    int			    i;
     XRRCrtcGamma	    *crtc_gamma;
     long    		    nbytes;
     long    		    nbytesRead;
 
-    RRCheckExtension (dpy, info, 0);
+    RRCheckExtension (dpy, info, NULL);
 
     LockDisplay(dpy);
     GetReq (RRGetCrtcGamma, req);
@@ -358,7 +354,6 @@ XRRGetCrtcTransform (Display	*dpy,
 		     XRRCrtcTransformAttributes **attributes)
 {
     XExtDisplayInfo		*info = XRRFindDisplay(dpy);
-    XRandRInfo			*xrri;
     xRRGetCrtcTransformReply	rep;
     xRRGetCrtcTransformReq	*req;
     int				major_version, minor_version;
@@ -472,7 +467,7 @@ XRRGetPanning (Display *dpy, XRRScreenResources *resources, RRCrtc crtc)
     xRRGetPanningReq	    *req;
     XRRPanning		    *xp;
 
-    RRCheckExtension (dpy, info, 0);
+    RRCheckExtension (dpy, info, NULL);
 
     LockDisplay (dpy);
     GetReq (RRGetPanning, req);
@@ -528,7 +523,6 @@ XRRSetPanning (Display *dpy,
     XExtDisplayInfo	    *info = XRRFindDisplay(dpy);
     xRRSetPanningReply      rep;
     xRRSetPanningReq	    *req;
-    int			    i;
 
     RRCheckExtension (dpy, info, 0);
 
diff --git a/src/XrrMode.c b/src/XrrMode.c
index fce3037..58ef68b 100644
--- a/src/XrrMode.c
+++ b/src/XrrMode.c
@@ -54,7 +54,6 @@ XRRCreateMode (Display *dpy, Window window, XRRModeInfo *mode_info)
     XExtDisplayInfo	    *info = XRRFindDisplay(dpy);
     xRRCreateModeReq	    *req;
     xRRCreateModeReply	    rep;
-    long		    channelSize;
 
     RRCheckExtension (dpy, info, None);
 
diff --git a/src/XrrOutput.c b/src/XrrOutput.c
index 9545cbe..0c39a31 100644
--- a/src/XrrOutput.c
+++ b/src/XrrOutput.c
@@ -42,11 +42,9 @@ XRRGetOutputInfo (Display *dpy, XRRScreenResources *resources, RROutput output)
     xRRGetOutputInfoReply	rep;
     xRRGetOutputInfoReq		*req;
     int				nbytes, nbytesRead, rbytes;
-    int				i;
-    xRRQueryVersionReq		*vreq;
     XRROutputInfo		*xoi;
 
-    RRCheckExtension (dpy, info, 0);
+    RRCheckExtension (dpy, info, NULL);
 
     LockDisplay (dpy);
     GetReq (RRGetOutputInfo, req);
@@ -142,7 +140,6 @@ XRRSetOutputPrimary(Display *dpy, Window window, RROutput output)
 {
     XExtDisplayInfo	    *info = XRRFindDisplay(dpy);
     xRRSetOutputPrimaryReq  *req;
-    int			    i;
     int			    major_version, minor_version;
 
     RRSimpleCheckExtension (dpy, info);
@@ -168,7 +165,6 @@ XRRGetOutputPrimary(Display *dpy, Window window)
     XExtDisplayInfo	    *info = XRRFindDisplay(dpy);
     xRRGetOutputPrimaryReq  *req;
     xRRGetOutputPrimaryReply rep;
-    int			    i;
     int			    major_version, minor_version;
 
     RRCheckExtension (dpy, info, 0);
diff --git a/src/XrrProperty.c b/src/XrrProperty.c
index d3d3246..9554f9a 100644
--- a/src/XrrProperty.c
+++ b/src/XrrProperty.c
@@ -38,12 +38,10 @@ XRRListOutputProperties (Display *dpy, RROutput output, int *nprop)
     XExtDisplayInfo		*info = XRRFindDisplay(dpy);
     xRRListOutputPropertiesReply rep;
     xRRListOutputPropertiesReq	*req;
-    int				nbytes, nbytesRead, rbytes;
-    int				i;
-    xRRQueryVersionReq		*vreq;
+    int				nbytes, rbytes;
     Atom			*props = NULL;
 
-    RRCheckExtension (dpy, info, 0);
+    RRCheckExtension (dpy, info, NULL);
 
     LockDisplay (dpy);
     GetReq (RRListOutputProperties, req);
@@ -87,11 +85,9 @@ XRRQueryOutputProperty (Display *dpy, RROutput output, Atom property)
     xRRQueryOutputPropertyReply rep;
     xRRQueryOutputPropertyReq	*req;
     int				rbytes, nbytes;
-    int				i;
-    xRRQueryVersionReq		*vreq;
     XRRPropertyInfo		*prop_info;
 
-    RRCheckExtension (dpy, info, 0);
+    RRCheckExtension (dpy, info, NULL);
 
     LockDisplay (dpy);
     GetReq (RRQueryOutputProperty, req);
@@ -140,7 +136,6 @@ XRRConfigureOutputProperty (Display *dpy, RROutput output, Atom property,
 {
     XExtDisplayInfo		    *info = XRRFindDisplay(dpy);
     xRRConfigureOutputPropertyReq   *req;
-    xRRQueryVersionReq		    *vreq;
     long len;
 
     RRSimpleCheckExtension (dpy, info);
@@ -173,7 +168,6 @@ XRRChangeOutputProperty (Display *dpy, RROutput output,
 {
     XExtDisplayInfo		*info = XRRFindDisplay(dpy);
     xRRChangeOutputPropertyReq	*req;
-    xRRQueryVersionReq		*vreq;
     long len;
 
     RRSimpleCheckExtension (dpy, info);
@@ -258,9 +252,7 @@ XRRGetOutputProperty (Display *dpy, RROutput output,
     XExtDisplayInfo		*info = XRRFindDisplay(dpy);
     xRRGetOutputPropertyReply	rep;
     xRRGetOutputPropertyReq	*req;
-    long    			nbytes, rbytes, nbytesRead;
-    int				i;
-    xRRQueryVersionReq		*vreq;
+    long    			nbytes, rbytes;
 
     RRCheckExtension (dpy, info, 1);
 
diff --git a/src/XrrScreen.c b/src/XrrScreen.c
index df49bb5..54bc2ca 100644
--- a/src/XrrScreen.c
+++ b/src/XrrScreen.c
@@ -53,7 +53,7 @@ doGetScreenResources (Display *dpy, Window window, int poll)
     Bool			getting_version = False;
     XRandRInfo			*xrri;
 
-    RRCheckExtension (dpy, info, 0);
+    RRCheckExtension (dpy, info, NULL);
 
     LockDisplay (dpy);
     xrri = (XRandRInfo *) info->data;

commit a0c45b798d2fa810167d64a92093840178f993b1
Author: Julien Cristau <jcristau@debian.org>
Date:   Sun Dec 21 16:32:17 2008 +0100

    Fix thinkos
    
    * XRRExtensionInfo can be static
    * XRRExtensionName is not called XrandrExtensionName

diff --git a/src/Xrandr.c b/src/Xrandr.c
index 06dbe10..c923e0f 100644
--- a/src/Xrandr.c
+++ b/src/Xrandr.c
@@ -34,7 +34,7 @@
 #include <X11/extensions/Xrender.h>
 #include "Xrandrint.h"
 
-_X_HIDDEN XExtensionInfo XRRExtensionInfo;
+static XExtensionInfo XRRExtensionInfo;
 _X_HIDDEN char XRRExtensionName[] = RANDR_NAME;
 
 static Bool     XRRWireToEvent(Display *dpy, XEvent *event, xEvent *wire);
diff --git a/src/Xrandrint.h b/src/Xrandrint.h
index abcdf3f..75e38c9 100644
--- a/src/Xrandrint.h
+++ b/src/Xrandrint.h
@@ -35,8 +35,7 @@
 #include <X11/extensions/randr.h>
 #include <X11/extensions/randrproto.h>
 
-extern XExtensionInfo XrandrExtensionInfo;
-extern char XrandrExtensionName[];
+extern char XRRExtensionName[];
 
 #define RRCheckExtension(dpy,i,val) \
   XextCheckExtension (dpy, i, XRRExtensionName, val)
@@ -88,8 +87,6 @@ typedef struct _randrVersionState {
     int		    minor_version;
 } _XRRVersionState;
 
-extern char XRRExtensionName[];
-
 Bool
 _XRRVersionHandler (Display	*dpy,
 		    xReply	*rep,

commit 8574ffb20fa10b6f2e9a5f115f23506b93c64b12
Author: Adam Jackson <ajax@redhat.com>
Date:   Wed Dec 17 11:33:37 2008 -0500

    libXrandr 1.2.99.4

diff --git a/configure.ac b/configure.ac
index 904bac8..d086cde 100644
--- a/configure.ac
+++ b/configure.ac
@@ -30,7 +30,7 @@ dnl try to keep these the same.  Note that the library has an extra
 dnl digit in the version number to track changes which don't affect the
 dnl protocol, so Xrandr version l.n.m corresponds to protocol version l.n
 dnl
-AC_INIT(libXrandr, 1.2.99.3, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], libXrandr)
+AC_INIT(libXrandr, 1.2.99.4, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], libXrandr)
 AC_CONFIG_AUX_DIR(.)
 AM_INIT_AUTOMAKE([dist-bzip2])
 AM_MAINTAINER_MODE

commit e2f075ea3927f83fb7ee8b359ef951222e8f894b
Author: Adam Jackson <ajax@redhat.com>
Date:   Wed Dec 17 11:29:05 2008 -0500

    Define _XRRHasRates internally.

diff --git a/src/Xrandrint.h b/src/Xrandrint.h
index 90c4785..abcdf3f 100644
--- a/src/Xrandrint.h
+++ b/src/Xrandrint.h
@@ -97,4 +97,7 @@ _XRRVersionHandler (Display	*dpy,
 		    int		len,
 		    XPointer    data);
 
+_X_HIDDEN Bool
+_XRRHasRates (int major, int minor);
+
 #endif /* _XRANDRINT_H_ */

commit 53bd07438d3671dca86df2bf3052f89ee8ce0891
Author: Adam Jackson <ajax@redhat.com>
Date:   Wed Dec 17 11:27:19 2008 -0500

    Be sure to return NULL when returning no properties.

diff --git a/src/XrrProperty.c b/src/XrrProperty.c
index 8377fff..d3d3246 100644
--- a/src/XrrProperty.c
+++ b/src/XrrProperty.c
@@ -41,7 +41,7 @@ XRRListOutputProperties (Display *dpy, RROutput output, int *nprop)
     int				nbytes, nbytesRead, rbytes;
     int				i;
     xRRQueryVersionReq		*vreq;
-    Atom			*props;
+    Atom			*props = NULL;
 
     RRCheckExtension (dpy, info, 0);
 

commit 7c1ccb19bd2545ccdf7099489e946e772a25649f
Author: Adam Jackson <ajax@redhat.com>
Date:   Wed Dec 17 11:25:20 2008 -0500

    Use RRCheckExtension in function returning a value.

diff --git a/src/XrrMode.c b/src/XrrMode.c
index fc624e1..fce3037 100644
--- a/src/XrrMode.c
+++ b/src/XrrMode.c
@@ -56,7 +56,7 @@ XRRCreateMode (Display *dpy, Window window, XRRModeInfo *mode_info)
     xRRCreateModeReply	    rep;
     long		    channelSize;
 
-    RRSimpleCheckExtension (dpy, info);
+    RRCheckExtension (dpy, info, None);
 
     LockDisplay(dpy);
     GetReq (RRCreateMode, req);

commit 2db939e82c29fa3ab868bac9d2b54de18419004b
Author: Adam Jackson <ajax@redhat.com>
Date:   Wed Dec 17 11:24:33 2008 -0500

    Fix type of GetReq() argument.

diff --git a/src/XrrOutput.c b/src/XrrOutput.c
index 3e41242..9545cbe 100644
--- a/src/XrrOutput.c
+++ b/src/XrrOutput.c
@@ -178,7 +178,7 @@ XRRGetOutputPrimary(Display *dpy, Window window)
 	return None;
 
     LockDisplay(dpy);
-    GetReq (RRSetOutputPrimary, req);
+    GetReq (RRGetOutputPrimary, req);
     req->reqType	= info->codes->major_opcode;
     req->randrReqType	= X_RRGetOutputProperty;
     req->window		= window;

commit c79e2aecab080d8f47b258ae3c4dd9394280ae2a
Author: Adam Jackson <ajax@redhat.com>
Date:   Wed Dec 17 11:23:51 2008 -0500

    Use RRSimpleCheckExtension in functions returning void

diff --git a/src/XrrOutput.c b/src/XrrOutput.c
index bc35fd1..3e41242 100644
--- a/src/XrrOutput.c
+++ b/src/XrrOutput.c
@@ -145,7 +145,7 @@ XRRSetOutputPrimary(Display *dpy, Window window, RROutput output)
     int			    i;
     int			    major_version, minor_version;
 
-    RRCheckExtension (dpy, info, 0);
+    RRSimpleCheckExtension (dpy, info);
 
     if (!XRRQueryVersion (dpy, &major_version, &minor_version) || 
 	!_XRRHasOutputPrimary (major_version, minor_version))

commit dda80ea67e33d18f7cc869c6f828c444c8966704
Author: Matthias Hopf <mhopf@suse.de>
Date:   Fri Dec 12 13:04:57 2008 +0100

    Bump to 1.2.99.3

diff --git a/configure.ac b/configure.ac
index 976cbc5..904bac8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -30,7 +30,7 @@ dnl try to keep these the same.  Note that the library has an extra
 dnl digit in the version number to track changes which don't affect the
 dnl protocol, so Xrandr version l.n.m corresponds to protocol version l.n
 dnl
-AC_INIT(libXrandr, 1.2.99.2, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], libXrandr)
+AC_INIT(libXrandr, 1.2.99.3, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], libXrandr)
 AC_CONFIG_AUX_DIR(.)
 AM_INIT_AUTOMAKE([dist-bzip2])
 AM_MAINTAINER_MODE

commit 59c8812099f33d56b43044f999ffe5df16adf5ff
Author: Adam Jackson <ajax@redhat.com>
Date:   Mon Dec 8 15:37:53 2008 -0500

    Add [GS]etOutputPrimary

diff --git a/include/X11/extensions/Xrandr.h b/include/X11/extensions/Xrandr.h
index 80d9d47..a411321 100644
--- a/include/X11/extensions/Xrandr.h
+++ b/include/X11/extensions/Xrandr.h
@@ -2,6 +2,7 @@
  * Copyright © 2000 Compaq Computer Corporation, Inc.
  * Copyright © 2002 Hewlett-Packard Company, Inc.
  * Copyright © 2006 Intel Corporation
+ * Copyright © 2008 Red Hat, Inc.
  *
  * Permission to use, copy, modify, distribute, and sell this software and its
  * documentation for any purpose is hereby granted without fee, provided that
@@ -440,6 +441,15 @@ XRRSetPanning (Display *dpy,
 	       RRCrtc crtc,
 	       XRRPanning *panning);
 
+void
+XRRSetOutputPrimary(Display *dpy,
+		    Window window,
+		    RROutput output);
+
+RROutput
+XRRGetOutputPrimary(Display *dpy,
+		    Window window);
+
 _XFUNCPROTOEND
 
 #endif /* _XRANDR_H_ */
diff --git a/src/XrrOutput.c b/src/XrrOutput.c
index 1fe03ae..bc35fd1 100644
--- a/src/XrrOutput.c
+++ b/src/XrrOutput.c
@@ -1,5 +1,6 @@
 /*
  * Copyright © 2006 Keith Packard
+ * Copyright © 2008 Red Hat, Inc.
  *
  * Permission to use, copy, modify, distribute, and sell this software and its
  * documentation for any purpose is hereby granted without fee, provided that
@@ -129,3 +130,64 @@ XRRFreeOutputInfo (XRROutputInfo *outputInfo)
 {
     Xfree (outputInfo);
 }
+
+static Bool
+_XRRHasOutputPrimary (int major, int minor)
+{
+    return major > 1 || (major == 1 && minor >= 3);
+}
+
+void
+XRRSetOutputPrimary(Display *dpy, Window window, RROutput output)
+{
+    XExtDisplayInfo	    *info = XRRFindDisplay(dpy);
+    xRRSetOutputPrimaryReq  *req;
+    int			    i;
+    int			    major_version, minor_version;
+
+    RRCheckExtension (dpy, info, 0);
+
+    if (!XRRQueryVersion (dpy, &major_version, &minor_version) || 
+	!_XRRHasOutputPrimary (major_version, minor_version))
+	return;
+
+    LockDisplay(dpy);
+    GetReq (RRSetOutputPrimary, req);
+    req->reqType       = info->codes->major_opcode;
+    req->randrReqType  = X_RRSetOutputPrimary;
+    req->window        = window;
+    req->output	       = output;
+
+    UnlockDisplay (dpy);
+    SyncHandle ();
+}
+
+RROutput
+XRRGetOutputPrimary(Display *dpy, Window window)
+{
+    XExtDisplayInfo	    *info = XRRFindDisplay(dpy);
+    xRRGetOutputPrimaryReq  *req;
+    xRRGetOutputPrimaryReply rep;
+    int			    i;
+    int			    major_version, minor_version;
+
+    RRCheckExtension (dpy, info, 0);
+
+    if (!XRRQueryVersion (dpy, &major_version, &minor_version) || 
+	!_XRRHasOutputPrimary (major_version, minor_version))
+	return None;
+
+    LockDisplay(dpy);
+    GetReq (RRSetOutputPrimary, req);
+    req->reqType	= info->codes->major_opcode;
+    req->randrReqType	= X_RRGetOutputProperty;
+    req->window		= window;
+
+    if (!_XReply (dpy, (xReply *) &rep, 0, xFalse))
+	rep.output = None;
+	
+    UnlockDisplay(dpy);
+    SyncHandle();
+
+    return rep.output;
+}

commit 0f11922bdc0d4e3929df4dc967379ea0b48338b8
Author: Matthias Hopf <mhopf@suse.de>
Date:   Thu Dec 4 18:24:42 2008 +0100

    Bump to 1.2.99.2.
    
    Note the .99

diff --git a/configure.ac b/configure.ac
index ceffa20..976cbc5 100644
--- a/configure.ac
+++ b/configure.ac
@@ -30,7 +30,7 @@ dnl try to keep these the same.  Note that the library has an extra
 dnl digit in the version number to track changes which don't affect the
 dnl protocol, so Xrandr version l.n.m corresponds to protocol version l.n
 dnl
-AC_INIT(libXrandr, 1.2.91, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], libXrandr)
+AC_INIT(libXrandr, 1.2.99.2, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], libXrandr)
 AC_CONFIG_AUX_DIR(.)
 AM_INIT_AUTOMAKE([dist-bzip2])
 AM_MAINTAINER_MODE

commit e788c1ed41e029e54470a2c79f1478c1be7bba92
Author: Matthias Hopf <mhopf@suse.de>
Date:   Thu Dec 4 15:51:07 2008 +0100

    Nuke config-timestamp for panning.

diff --git a/src/XrrCrtc.c b/src/XrrCrtc.c
index 6b0cdd8..91b1671 100644
--- a/src/XrrCrtc.c
+++ b/src/XrrCrtc.c
@@ -479,7 +479,6 @@ XRRGetPanning (Display *dpy, XRRScreenResources *resources, RRCrtc crtc)
     req->reqType         = info->codes->major_opcode;
     req->randrReqType    = X_RRGetPanning;
     req->crtc            = crtc;
-    req->configTimestamp = resources->configTimestamp;
 
     if (!_XReply (dpy, (xReply *) &rep, 1, xFalse))
     {
@@ -539,7 +538,6 @@ XRRSetPanning (Display *dpy,
     req->randrReqType  = X_RRSetPanning;
     req->crtc          = crtc;
     req->timestamp     = panning->timestamp;
-    req->configTimestamp = resources->configTimestamp;
     req->left          = panning->left;
     req->top           = panning->top;
     req->width         = panning->width;

commit 1de7212d9a945403f13f4dc15a66ec115c3be44c
Author: Matthias Hopf <mhopf@suse.de>
Date:   Fri Nov 28 17:26:43 2008 +0100

    Panning support

diff --git a/include/X11/extensions/Xrandr.h b/include/X11/extensions/Xrandr.h
index 892fae8..80d9d47 100644
--- a/include/X11/extensions/Xrandr.h
+++ b/include/X11/extensions/Xrandr.h
@@ -412,6 +412,34 @@ XRRGetCrtcTransform (Display	*dpy,
  */
 int XRRUpdateConfiguration(XEvent *event);
 
+typedef struct _XRRPanning {
+    Time            timestamp;
+    unsigned int left;
+    unsigned int top;
+    unsigned int width;
+    unsigned int height;
+    unsigned int track_left;
+    unsigned int track_top;
+    unsigned int track_width;
+    unsigned int track_height;
+    int          border_left;
+    int          border_top;
+    int          border_right;
+    int          border_bottom;
+} XRRPanning;
+
+XRRPanning *
+XRRGetPanning (Display *dpy, XRRScreenResources *resources, RRCrtc crtc);
+
+void
+XRRFreePanning (XRRPanning *panning);
+
+Status
+XRRSetPanning (Display *dpy,
+	       XRRScreenResources *resources,
+	       RRCrtc crtc,
+	       XRRPanning *panning);
+
 _XFUNCPROTOEND
 
 #endif /* _XRANDR_H_ */
diff --git a/src/XrrCrtc.c b/src/XrrCrtc.c
index 66dbc67..6b0cdd8 100644
--- a/src/XrrCrtc.c
+++ b/src/XrrCrtc.c
@@ -463,3 +463,100 @@ XRRGetCrtcTransform (Display	*dpy,
 
     return True;
 }
+
+XRRPanning *
+XRRGetPanning (Display *dpy, XRRScreenResources *resources, RRCrtc crtc)
+{
+    XExtDisplayInfo	    *info = XRRFindDisplay(dpy);
+    xRRGetPanningReply	    rep;
+    xRRGetPanningReq	    *req;
+    XRRPanning		    *xp;
+
+    RRCheckExtension (dpy, info, 0);
+
+    LockDisplay (dpy);
+    GetReq (RRGetPanning, req);
+    req->reqType         = info->codes->major_opcode;
+    req->randrReqType    = X_RRGetPanning;
+    req->crtc            = crtc;
+    req->configTimestamp = resources->configTimestamp;
+
+    if (!_XReply (dpy, (xReply *) &rep, 1, xFalse))
+    {
+	UnlockDisplay (dpy);
+	SyncHandle ();
+	return NULL;
+    }
+
+    if (! (xp = (XRRPanning *) Xmalloc(sizeof(XRRPanning))) ) {
+	_XEatData (dpy, sizeof(XRRPanning));
+	UnlockDisplay (dpy);
+	SyncHandle ();
+	return NULL;
+    }
+
+    xp->timestamp     = rep.timestamp;
+    xp->left          = rep.left;
+    xp->top           = rep.top;
+    xp->width         = rep.width;
+    xp->height        = rep.height;
+    xp->track_left    = rep.track_left;
+    xp->track_top     = rep.track_top;
+    xp->track_width   = rep.track_width;
+    xp->track_height  = rep.track_height;
+    xp->border_left   = rep.border_left;
+    xp->border_top    = rep.border_top;
+    xp->border_right  = rep.border_right;
+    xp->border_bottom = rep.border_bottom;
+
+    UnlockDisplay (dpy);
+    SyncHandle ();
+    return (XRRPanning *) xp;
+}
+
+void
+XRRFreePanning (XRRPanning *panning)
+{
+    Xfree (panning);
+}
+
+Status
+XRRSetPanning (Display *dpy,
+               XRRScreenResources *resources,
+               RRCrtc crtc,
+               XRRPanning *panning)
+{
+    XExtDisplayInfo	    *info = XRRFindDisplay(dpy);
+    xRRSetPanningReply      rep;
+    xRRSetPanningReq	    *req;
+    int			    i;
+
+    RRCheckExtension (dpy, info, 0);
+
+    LockDisplay(dpy);
+    GetReq (RRSetPanning, req);
+    req->reqType       = info->codes->major_opcode;
+    req->randrReqType  = X_RRSetPanning;
+    req->crtc          = crtc;
+    req->timestamp     = panning->timestamp;
+    req->configTimestamp = resources->configTimestamp;
+    req->left          = panning->left;
+    req->top           = panning->top;
+    req->width         = panning->width;
+    req->height        = panning->height;
+    req->track_left    = panning->track_left;
+    req->track_top     = panning->track_top;
+    req->track_width   = panning->track_width;
+    req->track_height  = panning->track_height;
+    req->border_left   = panning->border_left;
+    req->border_top    = panning->border_top;
+    req->border_right  = panning->border_right;
+    req->border_bottom = panning->border_bottom;
+
+    if (!_XReply (dpy, (xReply *) &rep, 0, xFalse))
+	rep.status = RRSetConfigFailed;
+    UnlockDisplay (dpy);
+    SyncHandle ();
+    return rep.status;
+}
+

commit 0dd24bd6ad3c437f320c5d8e922c479fb61b115f
Author: Julien Cristau <jcristau@debian.org>
Date:   Mon Dec 1 21:19:35 2008 +0100

    Bump to 1.2.91

diff --git a/configure.ac b/configure.ac
index 299eff8..ceffa20 100644
--- a/configure.ac
+++ b/configure.ac
@@ -30,7 +30,7 @@ dnl try to keep these the same.  Note that the library has an extra
 dnl digit in the version number to track changes which don't affect the
 dnl protocol, so Xrandr version l.n.m corresponds to protocol version l.n
 dnl
-AC_INIT(libXrandr, 1.2.3, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], libXrandr)
+AC_INIT(libXrandr, 1.2.91, [https://bugs.freedesktop.org/enter_bug.cgi?product=xorg], libXrandr)
 AC_CONFIG_AUX_DIR(.)
 AM_INIT_AUTOMAKE([dist-bzip2])
 AM_MAINTAINER_MODE

commit 0fa7452220701ee44d8bafc57001e362afcedb0c
Author: Julien Cristau <jcristau@debian.org>
Date:   Mon Dec 1 21:09:44 2008 +0100

    RRNotify subevents have 'window' at different offsets, the sequel
    
    f176b2bda103f6f38aabab8207f47a02cc797659 fixed XRRWireToEvent, but
    XRREventToWire had the same bug.
    
    Signed-off-by: Julien Cristau <jcristau@debian.org>

diff --git a/src/Xrandr.c b/src/Xrandr.c
index 2de995c..06dbe10 100644
--- a/src/Xrandr.c
+++ b/src/Xrandr.c
@@ -177,12 +177,12 @@ static Status XRREventToWire(Display *dpy, XEvent *event, xEvent *wire)
 	XRRNotifyEvent *aevent = (XRRNotifyEvent *) event;
 	awire->type = aevent->type | (aevent->send_event ? 0x80 : 0);
 	awire->sequenceNumber = aevent->serial & 0xFFFF;
-	awire->window = aevent->window;
 	awire->subCode = aevent->subtype;
 	switch (aevent->subtype) {
 	case RRNotify_OutputChange: {
 	    xRROutputChangeNotifyEvent *awire = (xRROutputChangeNotifyEvent *) wire;
 	    XRROutputChangeNotifyEvent *aevent = (XRROutputChangeNotifyEvent *) event;
+	    awire->window = aevent->window;
 	    awire->output = aevent->output;
 	    awire->crtc = aevent->crtc;
 	    awire->mode = aevent->mode;
@@ -194,6 +194,7 @@ static Status XRREventToWire(Display *dpy, XEvent *event, xEvent *wire)
 	case RRNotify_CrtcChange: {
 	    xRRCrtcChangeNotifyEvent *awire = (xRRCrtcChangeNotifyEvent *) wire;
 	    XRRCrtcChangeNotifyEvent *aevent = (XRRCrtcChangeNotifyEvent *) event;


Reply to: