[gnome-shell] ScreenShield: don't reset the lock screen animation if it's already happening



commit a757ce48a14e987814ccc23de742a4e4aaebcade
Author: Giovanni Campagna <gcampagna src gnome org>
Date:   Sat Dec 29 15:25:03 2012 +0100

    ScreenShield: don't reset the lock screen animation if it's already happening
    
    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.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=690858

 js/ui/screenShield.js |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/js/ui/screenShield.js b/js/ui/screenShield.js
index 3ee24eb..81d9655 100644
--- a/js/ui/screenShield.js
+++ b/js/ui/screenShield.js
@@ -760,6 +760,10 @@ const ScreenShield = new Lang.Class({
     },
 
     _resetLockScreen: function(animateLockScreen, animateLockDialog) {
+        if (this._lockScreenState == MessageTray.State.SHOWING ||
+            this._lockScreenState == MessageTray.State.SHOWN)
+            return;
+
         this._ensureLockScreen();
         this._lockDialogGroup.scale_x = 1;
         this._lockDialogGroup.scale_y = 1;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]