ShellDBus: fully show the lock screen before returning for Lock

Otherwise, gnome-settings-daemon proceeds with suspension too early,
and we may end up with visible windows on resume.

https://bugzilla.gnome.org/show_bug.cgi?id=683448
This commit is contained in:
Giovanni Campagna 2012-09-05 22:19:45 +02:00
parent 5030d59fcc
commit ad8bdb929a

View File

@ -351,7 +351,13 @@ const ScreenSaverDBus = new Lang.Class({
this._dbusImpl.export(Gio.DBus.session, '/org/gnome/ScreenSaver');
},
Lock: function() {
LockAsync: function(parameters, invocation) {
let tmpId = Main.screenShield.connect('lock-screen-shown', Lang.bind(this, function() {
Main.screenShield.disconnect(tmpId);
invocation.return_value(null);
}));
Main.screenShield.lock(true);
},