From bde0a4c12cb393a6d7f1552b067624da1b0502ae Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Wed, 20 Sep 2006 19:42:34 -0700 Subject: [PATCH] RRSetCrtcConfig status fix. RRGetScreenResources timestamp fix. RRSetCrtcConfig was returning the wrong status values. RRGetScreenResources was always returning currentTime. --- randr/rrcrtc.c | 9 +++++++-- randr/rrscreen.c | 4 ++-- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/randr/rrcrtc.c b/randr/rrcrtc.c index 90d609ed0..dfa9ca6ee 100644 --- a/randr/rrcrtc.c +++ b/randr/rrcrtc.c @@ -628,8 +628,13 @@ ProcRRSetCrtcConfig (ClientPtr client) goto sendReply; } - rep.status = RRCrtcSet (crtc, mode, stuff->x, stuff->y, - rotation, numOutputs, outputs); + if (!RRCrtcSet (crtc, mode, stuff->x, stuff->y, + rotation, numOutputs, outputs)) + { + rep.status = RRSetConfigFailed; + goto sendReply; + } + rep.status = RRSetConfigSuccess; sendReply: if (outputs) diff --git a/randr/rrscreen.c b/randr/rrscreen.c index 617ae4109..e59947b36 100644 --- a/randr/rrscreen.c +++ b/randr/rrscreen.c @@ -360,8 +360,8 @@ ProcRRGetScreenResources (ClientPtr client) rep.type = X_Reply; rep.sequenceNumber = client->sequence; rep.length = 0; - rep.timestamp = currentTime.milliseconds; - rep.configTimestamp = currentTime.milliseconds; + rep.timestamp = pScrPriv->lastSetTime.milliseconds; + rep.configTimestamp = pScrPriv->lastConfigTime.milliseconds; rep.nCrtcs = pScrPriv->numCrtcs; rep.nOutputs = pScrPriv->numOutputs; rep.nModes = pScrPriv->numModes;;