[PATCH] Make RANDR 'set' timestamps follow client specified time. Bug 21987.

Keith Packard keithp at keithp.com
Thu May 28 14:46:05 PDT 2009


The lastSetTime value which indicates when the configuration within the
server was last changed was not getting set in the appropriate RandR
requests.

Signed-off-by: Keith Packard <keithp at keithp.com>
---
 randr/rrcrtc.c   |    5 ++++-
 randr/rrscreen.c |    4 +++-
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/randr/rrcrtc.c b/randr/rrcrtc.c
index 7b724ae..716cb30 100644
--- a/randr/rrcrtc.c
+++ b/randr/rrcrtc.c
@@ -990,6 +990,7 @@ ProcRRSetCrtcConfig (ClientPtr client)
 	goto sendReply;
     }
     rep.status = RRSetConfigSuccess;
+    pScrPriv->lastSetTime = time;
     
 sendReply:
     if (outputs)
@@ -999,7 +1000,7 @@ sendReply:
     /* rep.status has already been filled in */
     rep.length = 0;
     rep.sequenceNumber = client->sequence;
-    rep.newTimestamp = pScrPriv->lastConfigTime.milliseconds;
+    rep.newTimestamp = pScrPriv->lastSetTime.milliseconds;
 
     if (client->swapped) 
     {
@@ -1149,6 +1150,8 @@ ProcRRSetPanning (ClientPtr client)
     if (! pScrPriv->rrSetPanning (pScreen, crtc, &total, &tracking, border))
 	return BadMatch;
 
+    pScrPriv->lastSetTime = time;
+
     rep.status = RRSetConfigSuccess;
 
 sendReply:
diff --git a/randr/rrscreen.c b/randr/rrscreen.c
index 94bf3ce..d715b76 100644
--- a/randr/rrscreen.c
+++ b/randr/rrscreen.c
@@ -945,8 +945,10 @@ ProcRRSetScreenConfig (ClientPtr client)
 
     if (!RRCrtcSet (crtc, mode, 0, 0, stuff->rotation, 1, &output))
 	rep.status = RRSetConfigFailed;
-    else
+    else {
+	pScreenPriv->lastSetTime = time;
 	rep.status = RRSetConfigSuccess;
+    }
 
     /*
      * XXX Configure other crtcs to mirror as much as possible
-- 
1.6.3.1




More information about the xorg mailing list