xserver: Branch 'master'

Keith Packard keithp at kemper.freedesktop.org
Wed Nov 26 15:56:23 PST 2008


 configure.ac        |    2 +-
 randr/randrstr.h    |    3 +++
 randr/rrdispatch.c  |    5 +++--
 randr/rrscreen.c    |   18 +++++++++++++++---
 randr/rrsdispatch.c |    5 +++--
 5 files changed, 25 insertions(+), 8 deletions(-)

New commits:
commit fc708394318ed92c612e2938b335c08c1ffebb28
Author: Keith Packard <keithp at keithp.com>
Date:   Wed Nov 26 15:49:02 2008 -0800

    Add server support for RRGetScreenResourcesCurrent
    
    This depends on randrproto 1.2.99.1
    
    Signed-off-by: Keith Packard <keithp at keithp.com>

diff --git a/configure.ac b/configure.ac
index 49d4165..ea3d0fa 100644
--- a/configure.ac
+++ b/configure.ac
@@ -664,7 +664,7 @@ XEXT_LIB='$(top_builddir)/Xext/libXext.la'
 XEXTXORG_LIB='$(top_builddir)/Xext/libXextbuiltin.la'
 
 dnl Core modules for most extensions, et al.
-REQUIRED_MODULES="[randrproto >= 1.2] [renderproto >= 0.9.3] [fixesproto >= 4.0] [damageproto >= 1.1] xcmiscproto [xextproto >= 7.0.3] [xproto >= 7.0.13] [xtrans >= 1.2.2] bigreqsproto resourceproto fontsproto [inputproto >= 1.9.99.6] [kbproto >= 1.0.3]"
+REQUIRED_MODULES="[randrproto >= 1.2.99.1] [renderproto >= 0.9.3] [fixesproto >= 4.0] [damageproto >= 1.1] xcmiscproto [xextproto >= 7.0.3] [xproto >= 7.0.13] [xtrans >= 1.2.2] bigreqsproto resourceproto fontsproto [inputproto >= 1.9.99.6] [kbproto >= 1.0.3]"
 REQUIRED_LIBS="xfont xau fontenc [pixman-1 >= 0.13.2]"
 
 dnl HAVE_DBUS is true if we actually have the D-Bus library, whereas
diff --git a/randr/randrstr.h b/randr/randrstr.h
index 822e377..64206e8 100644
--- a/randr/randrstr.h
+++ b/randr/randrstr.h
@@ -388,6 +388,9 @@ int
 ProcRRGetScreenResources (ClientPtr client);
 
 int
+ProcRRGetScreenResourcesCurrent (ClientPtr client);
+
+int
 ProcRRSetScreenConfig (ClientPtr client);
 
 int
diff --git a/randr/rrdispatch.c b/randr/rrdispatch.c
index 20b471c..64af6ce 100644
--- a/randr/rrdispatch.c
+++ b/randr/rrdispatch.c
@@ -212,7 +212,8 @@ int (*ProcRandrVector[RRNumberRequests])(ClientPtr) = {
     ProcRRGetCrtcGamma,		/* 23 */
     ProcRRSetCrtcGamma,		/* 24 */
 /* V1.3 additions */
-    ProcRRSetCrtcTransform,	/* 25 */
-    ProcRRGetCrtcTransform,	/* 26 */
+    ProcRRGetScreenResourcesCurrent, /* 25 */
+    ProcRRSetCrtcTransform,	/* 26 */
+    ProcRRGetCrtcTransform,	/* 27 */
 };
 
diff --git a/randr/rrscreen.c b/randr/rrscreen.c
index a910368..7a8f2eb 100644
--- a/randr/rrscreen.c
+++ b/randr/rrscreen.c
@@ -314,8 +314,8 @@ ProcRRSetScreenSize (ClientPtr client)
     return Success;
 }
 
-int
-ProcRRGetScreenResources (ClientPtr client)
+static int
+rrGetScreenResources(ClientPtr client, Bool query)
 {
     REQUEST(xRRGetScreenResourcesReq);
     xRRGetScreenResourcesReply  rep;
@@ -339,7 +339,7 @@ ProcRRGetScreenResources (ClientPtr client)
     pScrPriv = rrGetScrPriv(pScreen);
     rep.pad = 0;
     
-    if (pScrPriv)
+    if (query && pScrPriv)
 	if (!RRGetInfo (pScreen))
 	    return BadAlloc;
 
@@ -463,6 +463,18 @@ ProcRRGetScreenResources (ClientPtr client)
     return client->noClientException;
 }
 
+int
+ProcRRGetScreenResources (ClientPtr client)
+{
+    return rrGetScreenResources(client, TRUE);
+}
+    
+int
+ProcRRGetScreenResourcesCurrent (ClientPtr client)
+{
+    return rrGetScreenResources(client, FALSE);
+}
+
 typedef struct _RR10Data {
     RRScreenSizePtr sizes;
     int		    nsize;
diff --git a/randr/rrsdispatch.c b/randr/rrsdispatch.c
index 66a0e16..5a6dab5 100644
--- a/randr/rrsdispatch.c
+++ b/randr/rrsdispatch.c
@@ -415,7 +415,8 @@ int (*SProcRandrVector[RRNumberRequests])(ClientPtr) = {
     SProcRRGetCrtcGamma,	/* 23 */
     SProcRRSetCrtcGamma,	/* 24 */
 /* V1.3 additions */
-    SProcRRSetCrtcTransform,	/* 25 */
-    SProcRRGetCrtcTransform,	/* 26 */
+    SProcRRGetScreenResources,	/* 25 GetScreenResourcesCurrent */
+    SProcRRSetCrtcTransform,	/* 26 */
+    SProcRRGetCrtcTransform,	/* 27 */
 };
 


More information about the xorg-commit mailing list