Created attachment 32398 [details] [review]
After xserver commit a32d717ac64b21e15a5736ae4981cdd32f2da56b applications using XResetScreenSaver() no longer prevent the KDE screensaver from activating, which uses XScreenSaverQueryInfo() to detect the idle time and activates after a specified timeout. After this commit there appears to be no way to detect that XResetScreenSaver() has been used (the IDLE timer is presumably affected as well).
Testcase: The two attached test apps.
$ g++ -I/usr/include/X11R6 a.cpp -lX11 -o a.out
$ g++ -I/usr/include/X11R6 b.cpp -lX11 -lXss -o b.out
$ ( sleep 20; ./a.out ) &
The time is not reset after 20 seconds even though it should.
Assuming a32d717ac64b21e15a5736ae4981cdd32f2da56b is correct, then I suggest the attached patch.
Created attachment 32399 [details]
test app 1
Created attachment 32400 [details]
test app 2
Fixed in master, thanks for the report!
Author: Julien Cristau <firstname.lastname@example.org>
Date: Fri Feb 12 23:34:57 2010 +0100
dix: restore lastDeviceEventTime update in dixSaveScreens
This was removed in 6b5978dcf1f7ac3ecc2f22df06f7000f360e2066 (Do not
reset lastDeviceEventTime when we do dixSaveScreens), but caused a
regression for XResetScreenSaver. Add the lastDeviceEventTime update
back, but restrict it to that case.
X.Org bug#25855 <http://bugs.freedesktop.org/25855>
Reported-by: Lubos Lunak <email@example.com>
Tested-by: Lubos Lunak <firstname.lastname@example.org>
Signed-off-by: Julien Cristau <email@example.com>
Signed-off-by: Keith Packard <firstname.lastname@example.org>
on Aug 28, 2016 at 08:38:34.
(provided by the Example extension).