statusMenu.js: Ensure screensaver is locked before switching users
Somewhat similar to (see bug 637540), we need to lock the screensaver *before* asking GDM to switch. https://bugzilla.gnome.org/show_bug.cgi?id=654565
This commit is contained in:
parent
664245d2a6
commit
c632074ba7
@ -301,8 +301,11 @@ StatusMenuButton.prototype = {
|
||||
|
||||
_onLoginScreenActivate: function() {
|
||||
Main.overview.hide();
|
||||
this._gdm.goto_login_session();
|
||||
this._onLockScreenActivate();
|
||||
// Ensure we only move to GDM after the screensaver has activated; in some
|
||||
// OS configurations, the X server may block event processing on VT switch
|
||||
this._screenSaverProxy.setActiveRemote(true, Lang.bind(this, function() {
|
||||
this._gdm.goto_login_session();
|
||||
}));
|
||||
},
|
||||
|
||||
_onQuitSessionActivate: function() {
|
||||
@ -315,6 +318,7 @@ StatusMenuButton.prototype = {
|
||||
|
||||
if (this._haveSuspend &&
|
||||
this._suspendOrPowerOffItem.state == PopupMenu.PopupAlternatingMenuItemState.DEFAULT) {
|
||||
// Ensure we only suspend after the screensaver has activated
|
||||
this._screenSaverProxy.SetActiveRemote(true, Lang.bind(this, function() {
|
||||
this._upClient.suspend_sync(null);
|
||||
}));
|
||||
|
Loading…
Reference in New Issue
Block a user