Bug 207348

Summary: kscreensaver does not respect SimulateUserActivity dbus method
Product: kscreensaver Reporter: Jonathan Thomas <echidnaman>
Component: generalAssignee: kscreensaver bugs tracking <kscreensaver-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: eqisow, l.lunak, mail
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In: 4.6

Description Jonathan Thomas 2009-09-14 14:39:58 UTC
Version:            (using KDE 4.3.1)
OS:                Linux
Installed from:    Ubuntu Packages

Forwarded from https://launchpad.net/bugs/310352
It was reported with KDE 4.1.3, but I find that the testcase given is still broken in KDE 4.3.1. Here's the original report:

"SimulateUserActivity should deactivate screensaver as though the user poked some keys. But this doesn't work.

The following should trigger the screensaver, wait 5 seconds and then unstick the saver (maybe prompting for a password). Instead the saver stays active until the user moves the mouse or presses a key."

As a testcase, run this command in konsole:

$ dbus-send --print-reply --type=method_call --dest=org.freedesktop.ScreenSaver /ScreenSaver org.freedesktop.ScreenSaver.SetActive boolean:true ; sleep 5 ; dbus-send --print-reply --type=method_call --dest=org.freedesktop.ScreenSaver /ScreenSaver org.freedesktop.ScreenSaver.SimulateUserActivity
Comment 1 Oswald Buddenhagen 2009-09-20 11:04:11 UTC
*** Bug 207946 has been marked as a duplicate of this bug. ***
Comment 2 Oswald Buddenhagen 2010-03-07 13:12:26 UTC
SimulateUserActivity is supposed to suppress the activation of the screensaver, not to stop it. at least that's my interpretation, and there is no spec to contradict it (yes, really).

what would be the use case for this, anyway?
Comment 3 Scott 2010-04-13 12:01:02 UTC
I had a use case:

I implemented a plasma data source and widget using http://code.google.com/p/pyfaces/ with the intent of having it activate the screen saver and pausing amarok when I left the computer, and deactivating the screen saver and resuming amarok when I returned.
Comment 4 Oswald Buddenhagen 2010-04-13 13:32:05 UTC
i can accept the use case, but you are clearly entering unstandardized terrain (i.e., it's likely that it won't work with other lockers as well - did you try?). you may be better off moving the mouse programmatically or sending a fake event, possibly using the xtest extension.
Comment 5 Oswald Buddenhagen 2010-10-23 14:44:04 UTC
SVN commit 1188948 by ossi:

make SimulateUserActivity have an effect even in locked state

that's not mandated by any standard, but whatever ...

FEATURE: 207348
FIXED-IN: 4.6

 M  +17 -2     lock/lockprocess.cc  
 M  +4 -0      screensaver/saverengine.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1188948