[PATCH] dix/events: Set currentTime to the given time stamp in NoticeTime

Rui Matos tiagomatos at gmail.com
Sat Apr 25 12:19:25 PDT 2015


The refactoring in commit efc1035ca958f2c9d266338a308518a0834b1773
removed the actual update of currentTime.

Signed-off-by: Rui Matos <tiagomatos at gmail.com>
---

I noticed this while investigating why hitting a key on GNOME's lock
screen would wake the monitor from DPMS but instantly enter DPMS
again. GNOME uses a 15 sec idle alarm to enter DPMS while the screen
is locked and it turns out that the X server was triggering this alarm
immediately when pressing a key.

Drilling down into the server I noticed that IdleTimeQueryValue() in
IdleTimeWakeupHandler() was getting values bigger than 15 sec in this
case which is clearly wrong since I had just pressed a key.

That's how I arrived at this patch, please review, thanks.


dix/events.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/dix/events.c b/dix/events.c
index b8c67fd..2500615 100644
--- a/dix/events.c
+++ b/dix/events.c
@@ -1063,6 +1063,7 @@ MonthChangedOrBadTime(CARD32 *ms)
 void
 NoticeTime(const DeviceIntPtr dev, TimeStamp time)
 {
+    currentTime = time;
     lastDeviceEventTime[XIAllDevices].time = currentTime;
     lastDeviceEventTime[dev->id].time = currentTime;
 
-- 
2.3.5



More information about the xorg-devel mailing list