After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 682746 - Suspend does not work from the user menu
Suspend does not work from the user menu
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: lock-screen
unspecified
Other Linux
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2012-08-26 21:05 UTC by Giovanni Campagna
Modified: 2012-08-26 21:46 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
ScreenShield: don't bump the lock screen while animating (4.55 KB, patch)
2012-08-26 21:20 UTC, Giovanni Campagna
committed Details | Review

Description Giovanni Campagna 2012-08-26 21:05:58 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.
Comment 1 Giovanni Campagna 2012-08-26 21:20:11 UTC
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.
Comment 2 Jasper St. Pierre (not reading bugmail) 2012-08-26 21:23:23 UTC
Review of attachment 222499 [details] [review]:

Anything wrong with Tweener.isTweening?
Comment 3 Giovanni Campagna 2012-08-26 21:26:47 UTC
(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)
Comment 4 Jasper St. Pierre (not reading bugmail) 2012-08-26 21:36:15 UTC
Review of attachment 222499 [details] [review]:

OK, this is fine.
Comment 5 Giovanni Campagna 2012-08-26 21:45:58 UTC
Attachment 222499 [details] pushed as 9dafaa2 - ScreenShield: don't bump the lock screen while animating