Bug 17916 - IsScreensaverActive returns false for Now Playing screensaver
: IsScreensaverActive returns false for Now Playing screensaver
Status: NEW
Product: SqueezePlay
Classification: Unclassified
Component: Screensavers
: 7.7.1
: All All
: -- minor with 1 vote (vote)
: ---
Assigned To: Unassigned bug - please assign me!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-03-01 09:19 UTC by 505
Modified: 2012-03-03 06:51 UTC (History)
1 user (show)

See Also:
Category: ---


Attachments
Patch to fix the problem (1.02 KB, patch)
2012-03-01 09:19 UTC, 505
Details | Diff
Patch to fix the problem v2 (It helps to actually test a patch...) (1.18 KB, patch)
2012-03-01 10:14 UTC, 505
Details | Diff
Patch to fix the problem (1.57 KB, patch)
2012-03-01 10:51 UTC, 505
Details | Diff
Patch to fix the problem (2.14 KB, patch)
2012-03-01 14:06 UTC, 505
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description 505 2012-03-01 09:19:55 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.
Comment 1 505 2012-03-01 10:14:51 UTC
Created attachment 7641 [details]
Patch to fix the problem v2 (It helps to actually test a patch...)
Comment 2 505 2012-03-01 10:51:36 UTC
Created attachment 7642 [details]
Patch to fix the problem
Comment 3 505 2012-03-01 14:06:44 UTC
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.
Comment 4 Ben Klaas 2012-03-02 05:26:42 UTC
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.
Comment 5 505 2012-03-03 06:51:17 UTC
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