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:
Adel Gadllah 2011-03-09 21:59:50 +01:00
parent 7f3920dbb7
commit 162d029c81

View File

@ -218,7 +218,9 @@ StatusMenuButton.prototype = {
if (this._haveSuspend &&
this._suspendOrPowerOffItem.state == PopupMenu.PopupAlternatingMenuItemState.DEFAULT) {
this._upClient.suspend_sync(null);
this._screenSaverProxy.LockRemote(Lang.bind(this, function() {
this._upClient.suspend_sync(null);
}));
} else {
Util.spawn(['gnome-session-quit', '--power-off']);
}