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 690858 - ScreenShield: don't reset the lock screen animation if it's already happening
ScreenShield: don't reset the lock screen animation if it's already happening
Status: RESOLVED FIXED
Product: gnome-shell
Classification: Core
Component: lock-screen
unspecified
Other All
: Normal normal
: ---
Assigned To: gnome-shell-maint
gnome-shell-maint
Depends on:
Blocks:
 
 
Reported: 2012-12-29 14:34 UTC by Giovanni Campagna
Modified: 2012-12-30 00:42 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
ScreenShield: don't reset the lock screen animation if it's already happening (1.40 KB, patch)
2012-12-29 14:34 UTC, Giovanni Campagna
committed Details | Review

Description Giovanni Campagna 2012-12-29 14:34:21 UTC
When you click Suspend from the user menu, the following things happen:
- we lock the screen internally by calling Main.screenShield.lock() and waiting
  for lock-screen-shown
- logind emits a Lock signal, which causes us to lock again
- gnome-settings-daemon notices PrepareForSleep, and calls org.gnome.ScreenSaver.Lock,
  just in case, so we lock once more
This means that, if you're lucky, you can see the curtain fall down multiple times,
as each .lock() call resets the animation.
Comment 1 Giovanni Campagna 2012-12-29 14:34:23 UTC
Created attachment 232370 [details] [review]
ScreenShield: don't reset the lock screen animation if it's already happening
Comment 2 drago01 2012-12-29 23:17:10 UTC
Review of attachment 232370 [details] [review]:

::: js/ui/screenShield.js
@@ +774,3 @@
     _resetLockScreen: function(animateLockScreen, animateLockDialog) {
+        if (this._lockScreenState == MessageTray.State.SHOWING ||
+            this._lockScreenState == MessageTray.State.SHOWN)

Using MessageTray.State to indicate the state of the look screen feels kind of odd to me, but that's unrelated to this patch.
Comment 3 Giovanni Campagna 2012-12-30 00:42:09 UTC
Attachment 232370 [details] pushed as a757ce4 - ScreenShield: don't reset the lock screen animation if it's already happening