GNOME Bugzilla – Bug 682746
Suspend does not work from the user menu
Last modified: 2012-08-26 21:46:03 UTC
This is one of hardest to track bug I've ever seen, and it is a regression from 46394eeb63cdaa22ee0a80541f54d0c3d385de7e - ScreenShield: bump the lock screen slightly when pressing a key. What happens is that to activate suspend you need to press alt. After you click on suspend, the lock screen grabs key focus, so the subsequent key release goes to it, and causes a bump. But since the bump overrides the tween on y installed by _resetLockScreen(true), it's onComplete is never called and lock-screen-shown is never emitted. To add some laugh to it, if you keep alt down, it correctly suspends - as many times as UserMenu connected to lock-screen-shown without success. PS: it should be mentioned, this bug does not happen with alternative-status-menu.
Created attachment 222499 [details] [review] ScreenShield: don't bump the lock screen while animating Bumping overrides any animation, and causes the installed onComplete not to run, which in turn breaks suspending from the user menu (as it listens to lock-screen-shown). Add a state variable (using an enumeration shared with messageTray) to control the lock screen, and only bump when the lock is still. I know it's kind of weird to reuse MessageTray.State, but I still want to use ScreenShield.State for a11y menu bug.
Review of attachment 222499 [details] [review]: Anything wrong with Tweener.isTweening?
(In reply to comment #2) > Review of attachment 222499 [details] [review]: > > Anything wrong with Tweener.isTweening? It wouldn't catch dragging, and would catch a bump in progress. (TBH, I didn't know it existed)
Review of attachment 222499 [details] [review]: OK, this is fine.
Attachment 222499 [details] pushed as 9dafaa2 - ScreenShield: don't bump the lock screen while animating