r37587 - in /desktop/experimental/gnome-shell/debian: changelog patches/revert-suspend-break.patch

smcv at users.alioth.debian.org smcv at users.alioth.debian.org
Mon Apr 22 10:16:39 UTC 2013


Author: smcv
Date: Mon Apr 22 10:16:38 2013
New Revision: 37587

URL: http://svn.debian.org/wsvn/pkg-gnome/?sc=1&rev=37587
Log:
* Team upload
* Reinstate support for suspend via UPower using the user-menu, until
  our logind is new enough to take over (Closes: #704272)
* Delay suspend for 1 second in the hope that that's long enough to lock
  the screen (works around #645716, but only if you suspend via the
  user-menu)

Modified:
    desktop/experimental/gnome-shell/debian/changelog
    desktop/experimental/gnome-shell/debian/patches/revert-suspend-break.patch

Modified: desktop/experimental/gnome-shell/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/experimental/gnome-shell/debian/changelog?rev=37587&op=diff
==============================================================================
--- desktop/experimental/gnome-shell/debian/changelog [utf-8] (original)
+++ desktop/experimental/gnome-shell/debian/changelog [utf-8] Mon Apr 22 10:16:38 2013
@@ -1,3 +1,14 @@
+gnome-shell (3.8.1-2) UNRELEASED; urgency=low
+
+  * Team upload
+  * Reinstate support for suspend via UPower using the user-menu, until
+    our logind is new enough to take over (Closes: #704272)
+  * Delay suspend for 1 second in the hope that that's long enough to lock
+    the screen (works around #645716, but only if you suspend via the
+    user-menu)
+
+ -- Simon McVittie <smcv at debian.org>  Mon, 22 Apr 2013 11:15:08 +0100
+
 gnome-shell (3.8.1-1) experimental; urgency=low
 
   * New upstream release

Modified: desktop/experimental/gnome-shell/debian/patches/revert-suspend-break.patch
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/experimental/gnome-shell/debian/patches/revert-suspend-break.patch?rev=37587&op=diff
==============================================================================
--- desktop/experimental/gnome-shell/debian/patches/revert-suspend-break.patch [utf-8] (original)
+++ desktop/experimental/gnome-shell/debian/patches/revert-suspend-break.patch [utf-8] Mon Apr 22 10:16:38 2013
@@ -1,18 +1,25 @@
-From b91d9c2867952520e685d689f75bc019befcaaf3 Mon Sep 17 00:00:00 2001
-From: Florian Müllner <fmuellner at gnome.org>
-Date: Sun, 03 Feb 2013 20:53:33 +0000
-Subject: loginManager: Make suspend() a NOP in the ConsoleKit path
+From 23a65607b011582e11be1ed4be5c309da14bf4d6 Mon Sep 17 00:00:00 2001
+From: Simon McVittie <simon.mcvittie at collabora.co.uk>
+Date: Sun, 21 Apr 2013 12:42:31 +0100
+Subject: [PATCH] Reinstate support for suspending via UPower
 
-UPower will remove its suspend support eventually, and g-s-d already
-depends on logind for power management.
+Debian's logind is currently too old to know how to suspend
+(Debian #704272).
 
-https://bugzilla.gnome.org/show_bug.cgi?id=693162
+Also delay suspend by 1 second, in the hope that this will avoid showing
+the old screen contents after resume (Debian #645716). With a newer
+logind, inhibiting suspend will fix this properly.
 
-Index: gnome-shell-3.7.90/js/misc/loginManager.js
-===================================================================
---- gnome-shell-3.7.90.orig/js/misc/loginManager.js	2013-02-23 15:17:56.532244380 -0500
-+++ gnome-shell-3.7.90/js/misc/loginManager.js	2013-02-23 15:19:29.800240480 -0500
-@@ -5,6 +5,7 @@
+Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=704272
+---
+ js/misc/loginManager.js |   33 +++++++++++++++++++++++++--------
+ 1 file changed, 25 insertions(+), 8 deletions(-)
+
+diff --git a/js/misc/loginManager.js b/js/misc/loginManager.js
+index ce4af41..280e478 100644
+--- a/js/misc/loginManager.js
++++ b/js/misc/loginManager.js
+@@ -5,6 +5,7 @@ const Gio = imports.gi.Gio;
  const Lang = imports.lang;
  const Mainloop = imports.mainloop;
  const Shell = imports.gi.Shell;
@@ -20,7 +27,15 @@
  const Signals = imports.signals;
  
  const SystemdLoginManagerIface = <interface name='org.freedesktop.login1.Manager'>
-@@ -137,12 +138,10 @@
+@@ -135,6 +136,7 @@ const LoginManagerSystemd = new Lang.Class({
+                                               '/org/freedesktop/login1');
+         this._proxy.connectSignal('PrepareForSleep',
+                                   Lang.bind(this, this._prepareForSleep));
++        this._upClient = new UPowerGlib.Client();
+     },
+ 
+     // Having this function is a bit of a hack since the Systemd and ConsoleKit
+@@ -178,12 +180,10 @@ const LoginManagerSystemd = new Lang.Class({
      },
  
      canSuspend: function(asyncCallback) {
@@ -37,7 +52,23 @@
      },
  
      listSessions: function(asyncCallback) {
-@@ -199,6 +198,7 @@
+@@ -204,7 +204,14 @@ const LoginManagerSystemd = new Lang.Class({
+     },
+ 
+     suspend: function() {
+-        this._proxy.SuspendRemote(true);
++        this.emit('prepare-for-sleep', true);
++        this.emit('prepare-for-sleep', false);
++	// hack: wait 1 second, by which time the screen will hopefully
++	// have finished locking
++        Mainloop.timeout_add(1000, Lang.bind(this, function() {
++            this._upClient.suspend_sync(null);
++            return false;
++        }));
+     },
+ 
+     inhibit: function(reason, callback) {
+@@ -240,6 +247,7 @@ const LoginManagerConsoleKit = new Lang.Class({
          this._proxy = new ConsoleKitManager(Gio.DBus.system,
                                              'org.freedesktop.ConsoleKit',
                                              '/org/freedesktop/ConsoleKit/Manager');
@@ -45,11 +76,31 @@
      },
  
      // Having this function is a bit of a hack since the Systemd and ConsoleKit
-@@ -252,6 +252,7 @@
+@@ -283,7 +291,10 @@ const LoginManagerConsoleKit = new Lang.Class({
+     },
+ 
+     canSuspend: function(asyncCallback) {
+-        asyncCallback(false);
++        Mainloop.idle_add(Lang.bind(this, function() {
++            asyncCallback(this._upClient.get_can_suspend());
++            return false;
++        }));
+     },
+ 
+     listSessions: function(asyncCallback) {
+@@ -301,6 +312,12 @@ const LoginManagerConsoleKit = new Lang.Class({
      suspend: function() {
          this.emit('prepare-for-sleep', true);
          this.emit('prepare-for-sleep', false);
-+        this._upClient.suspend_sync(null);
++	// hack: wait 1 second, by which time the screen will hopefully
++	// have finished locking
++        Mainloop.timeout_add(1000, Lang.bind(this, function() {
++            this._upClient.suspend_sync(null);
++            return false;
++        }));
      },
  
      inhibit: function(reason, callback) {
+-- 
+1.7.10.4
+




More information about the pkg-gnome-commits mailing list