Comment 97 for bug 428884

Revision history for this message
In , L-lunak (l-lunak) wrote :

Created an attachment (id=32398)
xserver patch

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 ) &
$ ./b.out
The time is not reset after 20 seconds even though it should.

Assuming a32d717ac64b21e15a5736ae4981cdd32f2da56b is correct, then I suggest the attached patch.