From ad8bdb929ac7c35ae192b872c0e13761d86db678 Mon Sep 17 00:00:00 2001 From: Giovanni Campagna Date: Wed, 5 Sep 2012 22:19:45 +0200 Subject: [PATCH] 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 --- js/ui/shellDBus.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/js/ui/shellDBus.js b/js/ui/shellDBus.js index 78aebab16..e85eabe65 100644 --- a/js/ui/shellDBus.js +++ b/js/ui/shellDBus.js @@ -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); },