[gnome-shell] statusMenu: Don't force a screen lock when suspending



commit 60f41a109ff76df5af50be5053d521b0e624e85d
Author: Florian Müllner <fmuellner gnome org>
Date:   Fri Jun 10 22:58:54 2011 +0200

    statusMenu: Don't force a screen lock when suspending
    
    The screen panel in System Settings has a preference whether the
    screen should be locked on suspend. This works fine when suspending
    by closing the lid, but the "Suspend" menu item in the user status
    menu ignores the setting and always locks the screen.
    Fix by activating the screen saver before suspending rather than
    locking explicitly.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=652327

 js/ui/statusMenu.js |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/js/ui/statusMenu.js b/js/ui/statusMenu.js
index 63d4112..b778d1f 100644
--- a/js/ui/statusMenu.js
+++ b/js/ui/statusMenu.js
@@ -26,7 +26,8 @@ const DISABLE_LOG_OUT_KEY = 'disable-log-out';
 
 const ScreenSaverInterface = {
     name: BUS_NAME,
-    methods: [ { name: 'Lock', inSignature: '' } ]
+    methods: [ { name: 'Lock', inSignature: '' },
+               { name: 'SetActive', inSignature: 'b' }]
 };
 
 let ScreenSaverProxy = DBus.makeProxyClass(ScreenSaverInterface);
@@ -269,7 +270,7 @@ StatusMenuButton.prototype = {
 
         if (this._haveSuspend &&
             this._suspendOrPowerOffItem.state == PopupMenu.PopupAlternatingMenuItemState.DEFAULT) {
-            this._screenSaverProxy.LockRemote(Lang.bind(this, function() {
+            this._screenSaverProxy.SetActiveRemote(true, Lang.bind(this, function() {
                 this._upClient.suspend_sync(null);
             }));
         } else {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]