Bugzilla – Bug 17916
IsScreensaverActive returns false for Now Playing screensaver
Last modified: 2012-03-03 06:51:17 UTC
Created attachment 7639 [details] Patch to fix the problem The service in the ScreenSavers applet to detect if a screen saver is active always returns false for the now playing screen saver. Apparently, because the now playing screen saver is not a real screen saver. If now playing is implemented as a real screen saver or now should not matter for any other applet calling the service. If the user hasn't interacted with the system during the screen saver time out, the expected result is that the screen saver is active. Thus, the call should return true, even for the now playing screen saver.
Created attachment 7641 [details] Patch to fix the problem v2 (It helps to actually test a patch...)
Created attachment 7642 [details] Patch to fix the problem
Created attachment 7643 [details] Patch to fix the problem Also clear the flag when the deactivateScreensaver() function is called from another applet. It is not sufficient to only clear the flag in this function. Any user input is caught by an event listener that will call this the deactivateScreensaver() function. However, the first check is to check if a screen saver is active. For the now playing screen saver, this is false, to the event listener exits, and never calls deactivateScreensaver(). Therefore, the flag must be cleared in the event listener too.
Be careful with implementing this one to really exercise some use case testing. The Now Playing screensaver is handled differently than all other screensavers on purpose, because typically if the NP screensaver has kicked in, we want to afford the user opportunity to do things on this screen without leaving it. This is especially true on Squeezeobx Touch, where a user might want to hit for example pause. This should happen without an exit of the screen. Other screensavers, e.g. clock, this is not the case-- the use case is always to exit the screen.
I did some testing, after a discussion with erland[1]. The patch doesn't change the implementation of the screen saver or how it's started, just the way a screen saver is detected. In the case of the Now Playing screen saver on the Touch, as soon as the user touches the screen, or uses a button on the remote, the screen saver flag is set to false. Screen presses are still registered, e.g. pause works. Thus, when asking if the screen saver is active at this point would return false. I think this is expected behaviour, since the user is interacting with the system, the screen saver is (or should be) off. [1] http://forums.slimdevices.com/showthread.php?t=93906