New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ScreenSaverLock: Hide the popup on suspend ^2 #11174
Conversation
If we get the events, it means stuff happened, we can't just only honor it in the most common workflows ;). This effectively reverts a tiny bit of koreader#10426 (I was sort of expecting this to be problematic at the time, and I most likely hadn't tested it).
a484ced
to
d5607c0
Compare
I reverted patch 11170, then applied this patch 11174. Works great! When unlock - message shows up and frointlight turens on. When I lock it back - message goes away, whole screen refreshes, frontlight goes off. The same with the sleep cover. |
I have absolutely no idea what the native system does with sleep covers; but as far as we're concerned, the IntoSS and OutOfSS Events are all properly in step lock, so it all looks good. |
The same behaviour can be achieved if:
|
I don't have a sleep cover to test with, but my trusty fridge magnet seems to behave as well as can be expected. I have seen it take a few seconds to "register" a "close" sometimes (and also a few cases of close -> open jitter, but, again, I'm placing a magnet by hand so this is pretty inaccurate to begin with ;p). |
Fun fact: the lipc events pass a different argument depending on the source of the wakeup (c.f., Button:
Hall sensor:
Not that this would help us much, as we don't really control the whole thing unlike on Kobo, but, still, fun tidbit nonetheless. (I'm also not confident those arguments would be quite portable, this is on a PW2). |
TL;DR: So, yeah, this looks as ready as it'll ever be. |
That one makes perfect sense, actually. That message is a hack, it's a one-time paint job, not a real widget. Anything that requires a redraw will effectively dismiss it. And, of course, rotation requires a redraw ;). On the upside, if the device were actually asleep, you shouldn't be able to rotate it (assuming the gyro isn't a wakeup source and/or it's handled properly if it is). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 3 of 3 files at r1, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @NiLuJe)
Looks and works great! Thank you NiLuJe! |
Because GH ate a commit during a rebase for some reason (it's fine locally, whatever).
Replaces #11170
This change is