When the screen saver is forcibly deactivated, the idle time counter is
reset for all devices but not for the fake XIAllDevices and
XIAllMasterDevices. XScreenSaverQueryInfo uses XIAlldevices to fill the
"idle" field, thus returning the wrong value.

Regression introduced in
commit 6aef209ebc2e54f5465da505a780f7b4cc273ee0
Author: Peter Hutterer <[email protected]>
Date:   Mon Mar 12 13:51:02 2012 +1000

    Change lastDeviceIdleTime to be per-device

X.Org Bug 56649 <http://bugs.freedesktop.org/show_bug.cgi?id=56649>

Signed-off-by: Peter Hutterer <[email protected]>
---
Test case: ScreenSaverTest.ScreenSaverActivateDeactivate
http://cgit.freedesktop.org/~whot/xorg-integration-tests/

 Xext/saver.c | 2 ++
 dix/window.c | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/Xext/saver.c b/Xext/saver.c
index ac4a633..f73e2a2 100644
--- a/Xext/saver.c
+++ b/Xext/saver.c
@@ -393,6 +393,8 @@ ScreenSaverFreeSuspend(pointer value, XID id)
             UpdateCurrentTimeIf();
             nt_list_for_each_entry(dev, inputInfo.devices, next)
                 lastDeviceEventTime[dev->id] = currentTime;
+            lastDeviceEventTime[XIAllDevices] = currentTime;
+            lastDeviceEventTime[XIAllMasterDevices] = currentTime;
             SetScreenSaverTimer();
         }
     }
diff --git a/dix/window.c b/dix/window.c
index e70531a..99b3e0a 100644
--- a/dix/window.c
+++ b/dix/window.c
@@ -3095,6 +3095,8 @@ dixSaveScreens(ClientPtr client, int on, int mode)
             UpdateCurrentTimeIf();
             nt_list_for_each_entry(dev, inputInfo.devices, next)
                 lastDeviceEventTime[dev->id] = currentTime;
+            lastDeviceEventTime[XIAllDevices] = currentTime;
+            lastDeviceEventTime[XIAllMasterDevices] = currentTime;
         }
         SetScreenSaverTimer();
     }
-- 
1.7.11.7

_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to