summaryrefslogtreecommitdiff
path: root/randr
diff options
context:
space:
mode:
authorPeter Hutterer <peter@cs.unisa.edu.au>2007-11-07 15:37:23 +1030
committerPeter Hutterer <peter@cs.unisa.edu.au>2007-11-07 15:37:23 +1030
commit0b729051c04da7068f1e6dd319190bd0a362b2c0 (patch)
tree6e15c5de67a40d04167fcf0a2e0e26af8eca11c2 /randr
parentb7ee005d327372c1e414ee6c526f9f7aee14bc86 (diff)
parentd7c5e8bfc1aecbd23a4cbb2eab08656587aac2e8 (diff)
Merge branch 'master' into mpx
Conflicts: Xi/extinit.c Xi/grabdev.c Xi/setmode.c Xi/ungrdev.c dix/devices.c dix/events.c dix/getevents.c include/dix.h mi/midispcur.c mi/misprite.c xkb/xkbActions.c xkb/xkbEvents.c xkb/xkbPrKeyEv.c
Diffstat (limited to 'randr')
-rw-r--r--randr/rroutput.c1
-rw-r--r--randr/rrproperty.c4
-rw-r--r--randr/rrscreen.c11
-rw-r--r--randr/rrxinerama.c14
4 files changed, 17 insertions, 13 deletions
diff --git a/randr/rroutput.c b/randr/rroutput.c
index a67e4931a..c1e971ddc 100644
--- a/randr/rroutput.c
+++ b/randr/rroutput.c
@@ -95,6 +95,7 @@ RROutputCreate (ScreenPtr pScreen,
output->numUserModes = 0;
output->userModes = NULL;
output->properties = NULL;
+ output->pendingProperties = FALSE;
output->changed = FALSE;
output->devPrivate = devPrivate;
diff --git a/randr/rrproperty.c b/randr/rrproperty.c
index 5ac073f81..4617064e4 100644
--- a/randr/rrproperty.c
+++ b/randr/rrproperty.c
@@ -386,7 +386,7 @@ ProcRRListOutputProperties (ClientPtr client)
for (prop = output->properties; prop; prop = prop->next)
numProps++;
if (numProps)
- if(!(pAtoms = (Atom *)ALLOCATE_LOCAL(numProps * sizeof(Atom))))
+ if(!(pAtoms = (Atom *)xalloc(numProps * sizeof(Atom))))
return(BadAlloc);
rep.type = X_Reply;
@@ -408,7 +408,7 @@ ProcRRListOutputProperties (ClientPtr client)
{
client->pSwapReplyFunc = (ReplySwapPtr)Swap32Write;
WriteSwappedDataToClient(client, numProps * sizeof(Atom), pAtoms);
- DEALLOCATE_LOCAL(pAtoms);
+ xfree(pAtoms);
}
return(client->noClientException);
}
diff --git a/randr/rrscreen.c b/randr/rrscreen.c
index 8798b4244..811a5571b 100644
--- a/randr/rrscreen.c
+++ b/randr/rrscreen.c
@@ -766,7 +766,6 @@ ProcRRSetScreenConfig (ClientPtr client)
pScrPriv = rrGetScrPriv(pScreen);
time = ClientTimeToServerTime(stuff->timestamp);
- configTime = ClientTimeToServerTime(stuff->configTimestamp);
if (!pScrPriv)
{
@@ -788,11 +787,15 @@ ProcRRSetScreenConfig (ClientPtr client)
crtc = output->crtc;
/*
- * if the client's config timestamp is not the same as the last config
+ * If the client's config timestamp is not the same as the last config
* timestamp, then the config information isn't up-to-date and
- * can't even be validated
+ * can't even be validated.
+ *
+ * Note that the client only knows about the milliseconds part of the
+ * timestamp, so using CompareTimeStamps here would cause randr to suddenly
+ * stop working after several hours have passed (freedesktop bug #6502).
*/
- if (CompareTimeStamps (configTime, pScrPriv->lastConfigTime) != 0)
+ if (stuff->configTimestamp != pScrPriv->lastConfigTime.milliseconds)
{
rep.status = RRSetConfigInvalidConfigTime;
goto sendReply;
diff --git a/randr/rrxinerama.c b/randr/rrxinerama.c
index 2a57e4e32..896f61fb5 100644
--- a/randr/rrxinerama.c
+++ b/randr/rrxinerama.c
@@ -148,12 +148,6 @@ ProcRRXineramaGetState(ClientPtr client)
}
static Bool
-RRXineramaScreenActive (ScreenPtr pScreen)
-{
- return rrGetScrPriv(pScreen) != NULL;
-}
-
-static Bool
RRXineramaCrtcActive (RRCrtcPtr crtc)
{
return crtc->mode != NULL && crtc->numOutputs > 0;
@@ -165,7 +159,7 @@ RRXineramaScreenCount (ScreenPtr pScreen)
int i, n;
n = 0;
- if (RRXineramaScreenActive (pScreen))
+ if (rrGetScrPriv (pScreen))
{
rrScrPriv(pScreen);
for (i = 0; i < pScrPriv->numCrtcs; i++)
@@ -175,6 +169,12 @@ RRXineramaScreenCount (ScreenPtr pScreen)
return n;
}
+static Bool
+RRXineramaScreenActive (ScreenPtr pScreen)
+{
+ return RRXineramaScreenCount (pScreen) > 0;
+}
+
int
ProcRRXineramaGetScreenCount(ClientPtr client)
{