Merge lp:~azzar1/gnome-shell/fix-1768786 into lp:~ubuntu-desktop/gnome-shell/ubuntu

Proposed by Andrea Azzarone
Status: Approved
Approved by: Sebastien Bacher
Approved revision: 150
Proposed branch: lp:~azzar1/gnome-shell/fix-1768786
Merge into: lp:~ubuntu-desktop/gnome-shell/ubuntu
Diff against target: 61 lines (+31/-4)
2 files modified
debian/changelog (+9/-0)
debian/patches/ubuntu_lock_on_suspend.patch (+22/-4)
To merge this branch: bzr merge lp:~azzar1/gnome-shell/fix-1768786
Reviewer Review Type Date Requested Status
Daniel van Vugt (community) Needs Information
Sebastien Bacher Approve
Marco Trevisan (Treviño) Approve
Review via email: mp+345203@code.launchpad.net

Commit message

* debian/patches/ubuntu_lock_on_suspend.patch:
    - Inhibit suspend until the screen is locked also in the case where
      automatic screen lock is disabled and screen lock on suspend is
      enabled (LP: #1768786)

To post a comment you must log in.
Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

LGTM

review: Approve
Revision history for this message
Andrea Azzarone (azzar1) wrote :

I just updated the commit message replacing "and" with "or".

lp:~azzar1/gnome-shell/fix-1768786 updated
150. By Andrea Azzarone

* debian/patches/ubuntu_lock_on_suspend.patch:
    - Inhibit suspend until the screen is locked also in the case where
      automatic screen lock is disabled and screen lock on suspend is
      enabled (LP: #1768786)

Revision history for this message
Andrea Azzarone (azzar1) wrote :

@seb128 commit message (and Changelog) updated!

Revision history for this message
Sebastien Bacher (seb128) wrote :

thanks, now I understand the description :) (&the code change also makes sense)

review: Approve
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

It's been suggested this is really bug 1532508. Too late to deduplicate and change the commit message?

review: Needs Information
Revision history for this message
Andrea Azzarone (azzar1) wrote :

I disagree. bug 1532508 used to refer to the generic problem (affecting upstream Gnome Shell too). bug 1768786 refers to a specific case due to a broken distro patch.

Unmerged revisions

150. By Andrea Azzarone

* debian/patches/ubuntu_lock_on_suspend.patch:
    - Inhibit suspend until the screen is locked also in the case where
      automatic screen lock is disabled and screen lock on suspend is
      enabled (LP: #1768786)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2018-04-23 19:56:38 +0000
3+++ debian/changelog 2018-05-16 20:13:35 +0000
4@@ -1,3 +1,12 @@
5+gnome-shell (3.28.1-0ubuntu3) UNRELEASED; urgency=medium
6+
7+ * debian/patches/ubuntu_lock_on_suspend.patch:
8+ - Inhibit suspend until the screen is locked also in the case where
9+ automatic screen lock is disabled and screen lock on suspend is
10+ enabled (LP: #1768786)
11+
12+ -- Andrea Azzarone <andrea.azzarone@canonical.com> Mon, 07 May 2018 22:54:23 +0200
13+
14 gnome-shell (3.28.1-0ubuntu2) bionic; urgency=medium
15
16 [ Marco Trevisan (Treviño) ]
17
18=== modified file 'debian/patches/ubuntu_lock_on_suspend.patch'
19--- debian/patches/ubuntu_lock_on_suspend.patch 2018-03-02 10:02:40 +0000
20+++ debian/patches/ubuntu_lock_on_suspend.patch 2018-05-16 20:13:35 +0000
21@@ -7,10 +7,10 @@
22 js/ui/screenShield.js | 3 ++-
23 1 file changed, 2 insertions(+), 1 deletion(-)
24
25-Index: gnome-shell-3.27.91/js/ui/screenShield.js
26+Index: gnome-shell-3.28.1/js/ui/screenShield.js
27 ===================================================================
28---- gnome-shell-3.27.91.orig/js/ui/screenShield.js
29-+++ gnome-shell-3.27.91/js/ui/screenShield.js
30+--- gnome-shell-3.28.1.orig/js/ui/screenShield.js
31++++ gnome-shell-3.28.1/js/ui/screenShield.js
32 @@ -32,6 +32,7 @@ const Util = imports.misc.util;
33 const SCREENSAVER_SCHEMA = 'org.gnome.desktop.screensaver';
34 const LOCK_ENABLED_KEY = 'lock-enabled';
35@@ -19,7 +19,25 @@
36
37 const LOCKDOWN_SCHEMA = 'org.gnome.desktop.lockdown';
38 const DISABLE_LOCK_KEY = 'disable-lock-screen';
39-@@ -727,7 +728,7 @@ var ScreenShield = new Lang.Class({
40+@@ -543,6 +544,7 @@ var ScreenShield = new Lang.Class({
41+
42+ this._settings = new Gio.Settings({ schema_id: SCREENSAVER_SCHEMA });
43+ this._settings.connect('changed::' + LOCK_ENABLED_KEY, this._syncInhibitor.bind(this));
44++ this._settings.connect('changed::' + SUSPEND_LOCK_ENABLED_KEY, this._syncInhibitor.bind(this));
45+
46+ this._lockSettings = new Gio.Settings({ schema_id: LOCKDOWN_SCHEMA });
47+ this._lockSettings.connect('changed::' + DISABLE_LOCK_KEY, this._syncInhibitor.bind(this));
48+@@ -707,7 +709,8 @@ var ScreenShield = new Lang.Class({
49+ },
50+
51+ _syncInhibitor() {
52+- let lockEnabled = this._settings.get_boolean(LOCK_ENABLED_KEY);
53++ let lockEnabled = this._settings.get_boolean(LOCK_ENABLED_KEY) ||
54++ this._settings.get_boolean(SUSPEND_LOCK_ENABLED_KEY);
55+ let lockLocked = this._lockSettings.get_boolean(DISABLE_LOCK_KEY);
56+ let inhibit = (this._loginSession && this._loginSession.Active &&
57+ !this._isActive && lockEnabled && !lockLocked);
58+@@ -727,7 +730,7 @@ var ScreenShield = new Lang.Class({
59
60 _prepareForSleep(loginManager, aboutToSuspend) {
61 if (aboutToSuspend) {

Subscribers

People subscribed via source and target branches