ac1e126
--- a/randr/rrscreen.c.orig	2006-07-05 21:31:44.000000000 +0300
ac1e126
+++ b/randr/rrscreen.c	2007-02-03 00:00:10.000000000 +0200
ac1e126
@@ -723,7 +723,6 @@
ac1e126
     pScrPriv = rrGetScrPriv(pScreen);
ac1e126
     
ac1e126
     time = ClientTimeToServerTime(stuff->timestamp);
ac1e126
-    configTime = ClientTimeToServerTime(stuff->configTimestamp);
ac1e126
     
ac1e126
     oldWidth = pScreen->width;
ac1e126
     oldHeight = pScreen->height;
ac1e126
@@ -738,11 +737,15 @@
ac1e126
 	return BadAlloc;
ac1e126
     
ac1e126
     /*
ac1e126
-     * if the client's config timestamp is not the same as the last config
ac1e126
+     * If the client's config timestamp is not the same as the last config
ac1e126
      * timestamp, then the config information isn't up-to-date and
ac1e126
-     * can't even be validated
ac1e126
+     * can't even be validated.
ac1e126
+     *
ac1e126
+     * Note that the client only knows about the milliseconds part of the
ac1e126
+     * timestamp, so using CompareTimeStamps here would cause randr to suddenly
ac1e126
+     * stop working after several hours have passed (freedesktop bug #6502).
ac1e126
      */
ac1e126
-    if (CompareTimeStamps (configTime, pScrPriv->lastConfigTime) != 0)
ac1e126
+    if (stuff->configTimestamp != pScrPriv->lastConfigTime.milliseconds)
ac1e126
     {
ac1e126
 	rep.status = RRSetConfigInvalidConfigTime;
ac1e126
 	goto sendReply;