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.
This commit is contained in:
@ -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);
|
||||
},
|
||||
|
Reference in New Issue
Block a user