summaryrefslogtreecommitdiff
path: root/randr
diff options
context:
space:
mode:
authorPeter Hutterer <whot@potoroo.wearablelab.ml.unisa.edu.au>2008-04-07 07:56:41 +0930
committerPeter Hutterer <whot@potoroo.wearablelab.ml.unisa.edu.au>2008-04-07 07:56:41 +0930
commitfd06e8f8c1d82a9d91931e8532bee0fd9c9ca9ab (patch)
treefda1a9d90f4a3e99af9da656939ff8c112cfeb33 /randr
parentb46a00918691cbd5ca80b6d3acae7614f93e073b (diff)
parent6c0cfe3d43b177c4cfaf7e228f32c655f9a98459 (diff)
Merge branch 'master' into dcdc_rework
Conflicts: Xext/xevie.c dix/dispatch.c
Diffstat (limited to 'randr')
-rw-r--r--randr/mirandr.c11
-rw-r--r--randr/randrstr.h13
-rw-r--r--randr/rrproperty.c19
-rw-r--r--randr/rrscreen.c1
-rw-r--r--randr/rrxinerama.c6
5 files changed, 40 insertions, 10 deletions
diff --git a/randr/mirandr.c b/randr/mirandr.c
index 3c4991e5a..777785380 100644
--- a/randr/mirandr.c
+++ b/randr/mirandr.c
@@ -74,6 +74,14 @@ miRROutputSetProperty (ScreenPtr pScreen,
}
Bool
+miRROutputGetProperty (ScreenPtr pScreen,
+ RROutputPtr output,
+ Atom property)
+{
+ return TRUE;
+}
+
+Bool
miRROutputValidateMode (ScreenPtr pScreen,
RROutputPtr output,
RRModePtr mode)
@@ -116,6 +124,9 @@ miRandRInit (ScreenPtr pScreen)
pScrPriv->rrCrtcSet = miRRCrtcSet;
pScrPriv->rrCrtcSetGamma = miRRCrtcSetGamma;
pScrPriv->rrOutputSetProperty = miRROutputSetProperty;
+#if RANDR_13_INTERFACE
+ pScrPriv->rrOutputGetProperty = miRROutputGetProperty;
+#endif
pScrPriv->rrOutputValidateMode = miRROutputValidateMode;
pScrPriv->rrModeDestroy = miRRModeDestroy;
diff --git a/randr/randrstr.h b/randr/randrstr.h
index e8358bc0c..62d4bbf46 100644
--- a/randr/randrstr.h
+++ b/randr/randrstr.h
@@ -54,6 +54,10 @@
/* required for ABI compatibility for now */
#define RANDR_10_INTERFACE 1
#define RANDR_12_INTERFACE 1
+#define RANDR_13_INTERFACE 1 /* requires RANDR_12_INTERFACE */
+#define RANDR_GET_CRTC_INTERFACE 1
+
+#define RANDR_INTERFACE_VERSION 0x0103
typedef XID RRMode;
typedef XID RROutput;
@@ -175,6 +179,12 @@ typedef void (*RRModeDestroyProcPtr) (ScreenPtr pScreen,
#endif
+#if RANDR_13_INTERFACE
+typedef Bool (*RROutputGetPropertyProcPtr) (ScreenPtr pScreen,
+ RROutputPtr output,
+ Atom property);
+#endif /* RANDR_13_INTERFACE */
+
typedef Bool (*RRGetInfoProcPtr) (ScreenPtr pScreen, Rotation *rotations);
typedef Bool (*RRCloseScreenProcPtr) ( int i, ScreenPtr pscreen);
@@ -220,6 +230,9 @@ typedef struct _rrScrPriv {
RROutputValidateModeProcPtr rrOutputValidateMode;
RRModeDestroyProcPtr rrModeDestroy;
#endif
+#if RANDR_13_INTERFACE
+ RROutputGetPropertyProcPtr rrOutputGetProperty;
+#endif
/*
* Private part of the structure; not considered part of the ABI
diff --git a/randr/rrproperty.c b/randr/rrproperty.c
index 4617064e4..9bb7081ca 100644
--- a/randr/rrproperty.c
+++ b/randr/rrproperty.c
@@ -300,13 +300,21 @@ RRPropertyValuePtr
RRGetOutputProperty (RROutputPtr output, Atom property, Bool pending)
{
RRPropertyPtr prop = RRQueryOutputProperty (output, property);
+ rrScrPrivPtr pScrPriv = rrGetScrPriv(output->pScreen);
if (!prop)
return NULL;
if (pending && prop->is_pending)
return &prop->pending;
- else
+ else {
+#if RANDR_13_INTERFACE
+ /* If we can, try to update the property value first */
+ if (pScrPriv->rrOutputGetProperty)
+ pScrPriv->rrOutputGetProperty(output->pScreen, output,
+ prop->propertyName);
+#endif
return &prop->current;
+ }
}
int
@@ -610,11 +618,10 @@ ProcRRGetOutputProperty (ClientPtr client)
if (prop->immutable && stuff->delete)
return BadAccess;
- if (stuff->pending && prop->is_pending)
- prop_value = &prop->pending;
- else
- prop_value = &prop->current;
-
+ prop_value = RRGetOutputProperty(output, stuff->property, stuff->pending);
+ if (!prop_value)
+ return BadAtom;
+
/* If the request type and actual type don't match. Return the
property information, but not the data. */
diff --git a/randr/rrscreen.c b/randr/rrscreen.c
index 811a5571b..f39197337 100644
--- a/randr/rrscreen.c
+++ b/randr/rrscreen.c
@@ -731,7 +731,6 @@ ProcRRSetScreenConfig (ClientPtr client)
int n, rc;
ScreenPtr pScreen;
rrScrPrivPtr pScrPriv;
- TimeStamp configTime;
TimeStamp time;
int i;
Rotation rotation;
diff --git a/randr/rrxinerama.c b/randr/rrxinerama.c
index 896f61fb5..240fca27a 100644
--- a/randr/rrxinerama.c
+++ b/randr/rrxinerama.c
@@ -122,7 +122,7 @@ ProcRRXineramaGetState(ClientPtr client)
Bool active = FALSE;
REQUEST_SIZE_MATCH(xPanoramiXGetStateReq);
- rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess);
+ rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess);
if(rc != Success)
return rc;
@@ -184,7 +184,7 @@ ProcRRXineramaGetScreenCount(ClientPtr client)
register int n, rc;
REQUEST_SIZE_MATCH(xPanoramiXGetScreenCountReq);
- rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess);
+ rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess);
if (rc != Success)
return rc;
@@ -211,7 +211,7 @@ ProcRRXineramaGetScreenSize(ClientPtr client)
register int n, rc;
REQUEST_SIZE_MATCH(xPanoramiXGetScreenSizeReq);
- rc = dixLookupWindow(&pWin, stuff->window, client, DixUnknownAccess);
+ rc = dixLookupWindow(&pWin, stuff->window, client, DixGetAttrAccess);
if (rc != Success)
return rc;