[gnome-shell] ScreenShield: make .lock() and .unlock() idempotent
- From: Giovanni Campagna <gcampagna src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] ScreenShield: make .lock() and .unlock() idempotent
- Date: Fri, 17 Aug 2012 17:14:25 +0000 (UTC)
commit 8dc9ceb2bcb1511f77c3e457dbbd775b70ab2a5c
Author: Giovanni Campagna <gcampagna src gnome org>
Date: Fri Aug 17 19:08:17 2012 +0200
ScreenShield: make .lock() and .unlock() idempotent
Those methods can be called multiple times in certain situations,
and will be even more so after hooking them to the system bus.
js/ui/screenShield.js | 8 +++++---
1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/js/ui/screenShield.js b/js/ui/screenShield.js
index f375417..c4a23b6 100644
--- a/js/ui/screenShield.js
+++ b/js/ui/screenShield.js
@@ -616,11 +616,13 @@ const ScreenShield = new Lang.Class({
this._lightbox.hide();
- Main.popModal(this.actor);
- this.actor.hide();
+ if (this._isModal) {
+ Main.popModal(this.actor);
+ this._isModal = false;
+ }
- this._isModal = false;
this._isLocked = false;
+ this.actor.hide();
this.emit('lock-status-changed', false);
},
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]