xorg-x11-server/xserver-1.3.0-xrandr-timestamp-buglet.patch
Adam Jackson ac1e1264d5 * Thu Sep 06 2007 Adam Jackson <ajax@redhat.com> 1.3.0.0-23
- xserver-1.3.0-xrandr-timestamp-buglet.patch: Make sure xrandr doesn't
  stop working after several hours. (Marius Gedminas, #273801)
2007-09-06 21:25:33 +00:00

30 lines
1.2 KiB
Diff

--- a/randr/rrscreen.c.orig 2006-07-05 21:31:44.000000000 +0300
+++ b/randr/rrscreen.c 2007-02-03 00:00:10.000000000 +0200
@@ -723,7 +723,6 @@
pScrPriv = rrGetScrPriv(pScreen);
time = ClientTimeToServerTime(stuff->timestamp);
- configTime = ClientTimeToServerTime(stuff->configTimestamp);
oldWidth = pScreen->width;
oldHeight = pScreen->height;
@@ -738,11 +737,15 @@
return BadAlloc;
/*
- * 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;