statusMenu: Lock screen before suspending
We need to lock the screen before suspending the system to prevent unauthorized access to the system / account. https://bugzilla.gnome.org/show_bug.cgi?id=643357
This commit is contained in:
parent
7f3920dbb7
commit
162d029c81
@ -218,7 +218,9 @@ StatusMenuButton.prototype = {
|
|||||||
|
|
||||||
if (this._haveSuspend &&
|
if (this._haveSuspend &&
|
||||||
this._suspendOrPowerOffItem.state == PopupMenu.PopupAlternatingMenuItemState.DEFAULT) {
|
this._suspendOrPowerOffItem.state == PopupMenu.PopupAlternatingMenuItemState.DEFAULT) {
|
||||||
|
this._screenSaverProxy.LockRemote(Lang.bind(this, function() {
|
||||||
this._upClient.suspend_sync(null);
|
this._upClient.suspend_sync(null);
|
||||||
|
}));
|
||||||
} else {
|
} else {
|
||||||
Util.spawn(['gnome-session-quit', '--power-off']);
|
Util.spawn(['gnome-session-quit', '--power-off']);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user