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