Bug 15223 - Touch skin isn't aware of remote skin's power state and vice versa
: Touch skin isn't aware of remote skin's power state and vice versa
Status: CLOSED FIXED
Product: SB Touch
Classification: Unclassified
Component: UI Skin
: unspecified
: Macintosh Debian Linux
: P2 normal (vote)
: 7.5.0
Assigned To: Michael Herger
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-12-01 03:36 UTC by Michael Herger
Modified: 2010-04-08 17:25 UTC (History)
5 users (show)

See Also:
Category: Bug


Attachments
video showing wrong behaviour (2.26 MB, video/quicktime)
2010-02-01 23:22 UTC, Michael Herger
Details
cleaning up the AutoSkinApplet (5.27 KB, patch)
2010-02-12 05:53 UTC, Michael Herger
Details | Diff
full applet file (2.85 KB, text/plain)
2010-02-12 05:56 UTC, Michael Herger
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Herger 2009-12-01 03:36:50 UTC
If I touch the screen after having powered off the fab4 using the IR remote, I won't see the power button, but the menu right away.

Hitting any button on the IR when the player was powered off using the touch skin will trigger that action.
Comment 1 Ben Klaas 2009-12-09 12:08:19 UTC
I can't reproduce this...

Steps:
1. Use IR Remote power button to turn fab4 off
- observe the whenOff screensaver kicks in (in my case that's "black clock")
2. Touch the screen.
- observe the screensaver stays activated, with a power button appearing on the screen to indicate it needs to be powered on

1. Use Touch interface power button on home menu to turn fab4 off
- observe the whenOff screensaver kicks in (in my case that's "black clock")
2. Hit a button (not power) on the IR remote
- observe the screensaver stays activated, with a power button appearing on the screen to indicate it needs to be powered on
3. Hit the power button on the IR remote
- observe the main menu appear


This looks all working as designed to me...
Comment 2 Michael Herger 2009-12-09 13:02:51 UTC
> Steps:
> 1. Use IR Remote power button to turn fab4 off
> - observe the whenOff screensaver kicks in (in my case that's "black  
> clock")
> 2. Touch the screen.
> - observe the screensaver stays activated, with a power button appearing  
> on the screen to indicate it needs to be powered on

That's exactly how it does _not_ work here. In that latter case with the  
first touch I'm back in the menu, navigating. Could the hardware revision  
make a difference? This is one of the very early models, with the hand  
soldered pins at the top. Factory reset today.
Comment 3 Ben Klaas 2009-12-09 13:07:42 UTC
QA to reproduce?
Comment 4 James Richardson 2009-12-09 15:29:02 UTC
1) What is the PROPER and expected behavior

2) What firmware did BEN / MICHAEL test with

with the 2 above questions answered, QA will be albe to properly verify this bug is valid or invalid
Comment 5 Ben Klaas 2009-12-09 15:55:49 UTC
James, two test cases are described in comment#1. The expected & designed behavior is listed there as well.

I was on r8202
Comment 6 Michael Herger 2009-12-10 03:29:44 UTC
See the same broken behaviour on the fab4 in the office. Tested with  
fab4/classic/boom remotes (in case this made any differenc)
Comment 7 Michael Herger 2010-01-07 22:16:54 UTC
Any news?!?
Comment 8 Michael Herger 2010-01-18 22:26:29 UTC
My fab4 still gets confused about its power states when using touch/IR. When changing to the other input method it would act as if it was in the other power state, but when I then try to change power state, I need to do it twice in order to get the state right.

Can't be that hard to reproduce, can it?
Comment 9 Kris Murphy 2010-02-01 16:24:45 UTC
I am unable to reproduce this with r8398.

I am experiencing the same behavior that Ben documented.
Comment 10 Michael Herger 2010-02-01 23:22:12 UTC
Created attachment 6479 [details]
video showing wrong behaviour

Maybe it's just my old hardware, but I see it on both my fab4s I have. I did Ben's second list of instructions, pressing the Down button on the remote - which woke up the screensaver.

Mickey - I'll probably need some new hardware to verify this fixed ;-)
Comment 11 Chris Owens 2010-02-08 13:16:33 UTC
*** Bug 15641 has been marked as a duplicate of this bug. ***
Comment 12 Michael Herger 2010-02-11 08:45:40 UTC
Looking at the code it's quite obvious I'm not dreaming: when skin mode is switched, the screensaver is disabled.

function _disableAnyScreensaver(self)
	if appletManager:callService("isScreensaverActive") then
		appletManager:callService("deactivateScreensaver")
		appletManager:callService("restartScreenSaverTimer")
	end
end

Richard - this code seems to have been there since the initial checkin . Do you remember why you added this? Removing it seems to fix the issue I'm seeing, and I haven't experienced negative side-effects. But I'm sure there's a good reason it's there :-)
Comment 13 Michael Herger 2010-02-11 08:51:48 UTC
Ok, digging deeper I've found the following comment in the private-branch/fab4:

https://svn.slimdevices.com/jive/7.4/private-branches/fab4/squeezeplay/src/squeezeplay_fab4/share/applets/AutoSkin/AutoSkinApplet.lua?revision=5909&view=markup

"- no more double touch to get rid of screensaver. Any SS is disabled when switching skins."

So this seems to be a feature, not a bug. I wonder why. We introduced the double touch to prevent accidental wake up. Why shouldn't this be the case when switching the skin?

Tom - any insight?
Comment 14 Michael Herger 2010-02-12 05:31:33 UTC
Trying to clean up this applet. Fixed bug 15109 left quite a bit of unused code in there.

After a quick chat with Richard (thanks!) it seems that Tom's change mentioned above was to work around a design decision taken in the early days: ignore the event leading to the skin change. That decision imho should be reverted, as it's not only confusing and leading to more issues similar to the one Tom tried to fix (see eg. bug 15624).
Comment 15 Michael Herger 2010-02-12 05:53:25 UTC
Created attachment 6516 [details]
cleaning up the AutoSkinApplet

- remove uncommented/disabled code (following the decision taken in bug 15109)
- don't throw away the event causing the skin switch (fixing bug 15624)
- remove the screensaver wrangling needed to work around side effects of the aforementioned ignoring of the first event
Comment 16 Michael Herger 2010-02-12 05:56:26 UTC
Created attachment 6517 [details]
full applet file
Comment 17 Michael Herger 2010-02-12 06:07:58 UTC
Playing with this a little more I think we'll need some _selective_ ignoring of the event causing the skin switch: while IR remote key presses are clearly defined actions, touching the screen is not. Eg. touching a menu entry shown in IR mode will often trigger some other action, as the same coordinates in the touch skin represent a different menu item.

Therefore I guess there are some conditions where we should indeed ignore those events:

- when switching from remote to touch skin
- and no screensaver is active
- ... (more to come - feel free to add your findings)
Comment 18 SVN Bot 2010-02-14 23:53:38 UTC
 == Auto-comment from SVN commit #8501 to the  repo by mherger ==
 == https://svn.slimdevices.com/?view=revision&revision=8501 ==

Fixed Bug: 15223
Fixed Bug: 15624
Description: AutoSkin refinements

- remove unused proximity sensor code (see bug 15109)

- ignore all touch events leading to a switch from remote to touch UI, unless we're in screensaver mode. All other actions might be surprising, as the layout of the UIs are different, potentially leading to unwanted actions to be triggered

- ignore _some_ IR events leading to a switch from touch to remote UI: play and right might lead to unexpected actions, as the selected item isn't visible in touch UI. All other remote buttons are not/less context sensitive, thus don't need to be ignored (eg. volume, pause, jump keys etc.)
Comment 19 Chris Owens 2010-02-18 10:02:39 UTC
Oops I forgot to remove bug_meeting from these bugs.
Comment 20 Chris Owens 2010-04-08 17:25:25 UTC
This bug has been marked fixed in a released version of Squeezebox Server or the accompanying firmware or mysqueezebox.com release.

If you are still seeing this issue, please let us know!