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); },