Package: release.debian.org Severity: normal User: release.debian....@packages.debian.org Usertags: unblock
Please unblock package cinnamon-screensaver The latest upload includes the following fixes that I'd like to see included in stretch: cinnamon-screensaver (3.2.13-3) unstable; urgency=medium * Import upstream's commit f579336 to allow users to select text in the password text entry. Mostly used for selecting all text and re-entering the password. * Import upstream's commits 29bd6e6 and f3c3d0f to ensure that the screensaver is started and the screen locked before the machine goes into suspend/hibernate. -- Margarita Manterola <ma...@debian.org> Sun, 02 Apr 2017 13:24:49 +0200 The first change is a small but quite annoying UX issue. A lot of users have the habit of pressing Ctrl-A to select everything and start again when they realize that the password was wrong. Without this patch, that's not possible. The second change is larger, but is also quite important as it's addressing a security issue, without it, it's possible that the screensaver hasn't locked the screen when the machine suspends, which means that on un-suspend, the screen is visible for a brief moment (usually 1 second) until the screensaver activates. I'm attaching the full debdiff, as well as the separate files for the patches for easier reviewing. unblock cinnamon-screensaver/3.2.13-3 -- Thanks, Marga
diff -Nru cinnamon-screensaver-3.2.13/debian/changelog cinnamon-screensaver-3.2.13/debian/changelog --- cinnamon-screensaver-3.2.13/debian/changelog 2017-03-12 12:24:52.000000000 +0100 +++ cinnamon-screensaver-3.2.13/debian/changelog 2017-04-02 13:24:49.000000000 +0200 @@ -1,3 +1,14 @@ +cinnamon-screensaver (3.2.13-3) unstable; urgency=medium + + * Import upstream's commit f579336 to allow users to select text in the + password text entry. Mostly used for selecting all text and re-entering the + password. + * Import upstream's commits 29bd6e6 and f3c3d0f to ensure that the screensaver + is started and the screen locked before the machine goes into + suspend/hibernate. + + -- Margarita Manterola <ma...@debian.org> Sun, 02 Apr 2017 13:24:49 +0200 + cinnamon-screensaver (3.2.13-2) unstable; urgency=medium * Add debian/cinnamon-screensaver-dialog, a helper script to ease the diff -Nru cinnamon-screensaver-3.2.13/debian/patches/series cinnamon-screensaver-3.2.13/debian/patches/series --- cinnamon-screensaver-3.2.13/debian/patches/series 2017-03-12 12:24:52.000000000 +0100 +++ cinnamon-screensaver-3.2.13/debian/patches/series 2017-04-02 13:24:49.000000000 +0200 @@ -1,2 +1,4 @@ change-iso-flag-path.patch move_pamhelper_to_libexec.patch +upstream_fix-textselection.patch +upstream_fix-suspend-lock.patch diff -Nru cinnamon-screensaver-3.2.13/debian/patches/upstream_fix-suspend-lock.patch cinnamon-screensaver-3.2.13/debian/patches/upstream_fix-suspend-lock.patch --- cinnamon-screensaver-3.2.13/debian/patches/upstream_fix-suspend-lock.patch 1970-01-01 01:00:00.000000000 +0100 +++ cinnamon-screensaver-3.2.13/debian/patches/upstream_fix-suspend-lock.patch 2017-04-02 13:24:49.000000000 +0200 @@ -0,0 +1,131 @@ +Description: fix screensaver behavior during suspend/hibernate. + Allow the screensaver to be activated synchronously from cinnamon-session in + response to suspend/hibernate actions, and ensure it's fully active already + when resuming. +Origin: upstream, 29bd6e61f2fc7164aca5a73de79135945b692d5b, + upstream, f3c3d0f9bb7e0fa6210b098ad127999c7d2f12e1 +Author: Michael Webster <miketwebs...@gmail.com> +Date: Mon, 23 Jan 2017 17:46:20 -0500 + +--- + +Index: cinnamon-screensaver/src/service.py +=================================================================== +--- cinnamon-screensaver.orig/src/service.py 2017-04-02 12:00:34.079811859 +0200 ++++ cinnamon-screensaver/src/service.py 2017-04-02 12:00:34.075811755 +0200 +@@ -69,13 +69,32 @@ + self.manager = ScreensaverManager() + self.manager.connect("active-changed", self.on_active_changed) + ++ """ ++ The stage constructs itself and fades in asynchronously, and most importantly, ++ as an idle callback. This can cause the screensaver to not be fully active when ++ a call to suspend is made. Cinnamon-session calls to lock the screensaver ++ synchronously, and if we don't completely finish construction before returning ++ the dbus call completion, there's a chance the idle callback won't run until ++ after the computer is resumed. ++ ++ We get an active-changed signal whenever the screensaver becomes completely active ++ or inactive, so we'll queue up running iface.complete_lock() until we receive that signal. ++ ++ This allows the screensaver to be fully activated prior to cinnamon-session allowing ++ the suspend/hibernate/whatever process to continue. ++ ++ For reference, this is called in cinnamon-session's csm-manager.c "manager_perhaps_lock" ++ method. ++ """ ++ self.lock_queue = [] ++ + self.interface.export(self.bus, c.SS_PATH) + + # Interface handlers + def handle_lock(self, iface, inv, msg): + self.manager.lock(msg) + +- iface.complete_lock(inv) ++ self.lock_queue.append(inv) + + return True + +@@ -118,4 +137,15 @@ + return True + + def on_active_changed(self, manager, state, data=None): ++ GObject.idle_add(self.on_active_changed_idle, state) ++ ++ def on_active_changed_idle(self, state): ++ self.lock_queue.reverse() ++ ++ while len(self.lock_queue) > 0: ++ invocation = self.lock_queue.pop() ++ self.interface.complete_lock(invocation) ++ ++ self.lock_queue = [] ++ + self.interface.emit_active_changed(state) +Index: cinnamon-screensaver/src/manager.py +=================================================================== +--- cinnamon-screensaver.orig/src/manager.py 2017-04-02 12:00:34.079811859 +0200 ++++ cinnamon-screensaver/src/manager.py 2017-04-02 12:00:34.075811755 +0200 +@@ -59,7 +59,7 @@ + Initiate locking (activating first if necessary.) + """ + if not status.Active: +- if self.set_active(True, msg): ++ if self.set_active(True, True, msg): + self.stop_lock_delay() + if utils.user_can_lock(): + status.Locked = True +@@ -76,7 +76,7 @@ + status.Locked = False + status.Awake = False + +- def set_active(self, active, msg=None): ++ def set_active(self, active, immediate=False, msg=None): + """ + Activates or deactivates the screensaver. Activation involves: + - sending a request to Cinnamon to exit Overview or Expo - +@@ -93,7 +93,11 @@ + self.cinnamon_client.exit_expo_and_overview() + if self.grab_helper.grab_root(False): + if not self.stage: +- self.spawn_stage(msg, c.STAGE_SPAWN_TRANSITION, self.on_spawn_stage_complete) ++ if immediate: ++ transition = 0 ++ else: ++ transition = c.STAGE_SPAWN_TRANSITION ++ self.spawn_stage(msg, transition, self.on_spawn_stage_complete) + return True + else: + status.Active = False +Index: cinnamon-screensaver/src/stage.py +=================================================================== +--- cinnamon-screensaver.orig/src/stage.py 2017-04-02 12:00:34.079811859 +0200 ++++ cinnamon-screensaver/src/stage.py 2017-04-02 12:00:34.075811755 +0200 +@@ -79,7 +79,6 @@ + self.override_background_color (Gtk.StateFlags.NORMAL, c); + + self.update_geometry() +- self.set_opacity(0.0) + + self.overlay = Gtk.Overlay() + self.fader = Fader(self) +@@ -135,8 +134,16 @@ + """ + This is the primary way of making the Stage visible. + """ +- self.realize() +- self.fader.fade_in(effect_time, callback) ++ if effect_time == 0: ++ self.set_opacity(1.0) ++ ++ self.show() ++ callback() ++ else: ++ self.set_opacity(0.0) ++ ++ self.realize() ++ self.fader.fade_in(effect_time, callback) + + def transition_out(self, effect_time, callback): + """ diff -Nru cinnamon-screensaver-3.2.13/debian/patches/upstream_fix-textselection.patch cinnamon-screensaver-3.2.13/debian/patches/upstream_fix-textselection.patch --- cinnamon-screensaver-3.2.13/debian/patches/upstream_fix-textselection.patch 1970-01-01 01:00:00.000000000 +0100 +++ cinnamon-screensaver-3.2.13/debian/patches/upstream_fix-textselection.patch 2017-04-02 13:24:49.000000000 +0200 @@ -0,0 +1,32 @@ +From f579336438ae5827d84dbc5d54b77da7abcebcfa Mon Sep 17 00:00:00 2001 +From: Michael Webster <miketwebs...@gmail.com> +Date: Tue, 10 Jan 2017 12:26:38 -0500 +Subject: [PATCH] stage.py: clear clipboards only once, when waking. + raise_unlock_widget gets called repeatedly when there is input (to refresh + other things) - having it repeatedly clear the clipboard was unnecessary, and + prevented keyboard navigation actions that included selection of characters - + such as ctrl-a, shift-home and -end. + +Fixes #197 +--- + src/stage.py | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +Index: cinnamon-screensaver/src/stage.py +=================================================================== +--- cinnamon-screensaver.orig/src/stage.py 2017-04-02 11:46:12.793587440 +0200 ++++ cinnamon-screensaver/src/stage.py 2017-04-02 11:46:12.789587337 +0200 +@@ -466,11 +466,12 @@ + our other reveals after its transition is complete. + """ + self.reset_timeout() +- utils.clear_clipboards(self.unlock_dialog) + + if status.Awake: + return + ++ utils.clear_clipboards(self.unlock_dialog) ++ + self.clock_widget.stop_positioning() + self.albumart_widget.stop_positioning() +
Description: fix screensaver behavior during suspend/hibernate. Allow the screensaver to be activated synchronously from cinnamon-session in response to suspend/hibernate actions, and ensure it's fully active already when resuming. Origin: upstream, 29bd6e61f2fc7164aca5a73de79135945b692d5b, upstream, f3c3d0f9bb7e0fa6210b098ad127999c7d2f12e1 Author: Michael Webster <miketwebs...@gmail.com> Date: Mon, 23 Jan 2017 17:46:20 -0500 --- Index: cinnamon-screensaver/src/service.py =================================================================== --- cinnamon-screensaver.orig/src/service.py 2017-04-02 12:00:34.079811859 +0200 +++ cinnamon-screensaver/src/service.py 2017-04-02 12:00:34.075811755 +0200 @@ -69,13 +69,32 @@ self.manager = ScreensaverManager() self.manager.connect("active-changed", self.on_active_changed) + """ + The stage constructs itself and fades in asynchronously, and most importantly, + as an idle callback. This can cause the screensaver to not be fully active when + a call to suspend is made. Cinnamon-session calls to lock the screensaver + synchronously, and if we don't completely finish construction before returning + the dbus call completion, there's a chance the idle callback won't run until + after the computer is resumed. + + We get an active-changed signal whenever the screensaver becomes completely active + or inactive, so we'll queue up running iface.complete_lock() until we receive that signal. + + This allows the screensaver to be fully activated prior to cinnamon-session allowing + the suspend/hibernate/whatever process to continue. + + For reference, this is called in cinnamon-session's csm-manager.c "manager_perhaps_lock" + method. + """ + self.lock_queue = [] + self.interface.export(self.bus, c.SS_PATH) # Interface handlers def handle_lock(self, iface, inv, msg): self.manager.lock(msg) - iface.complete_lock(inv) + self.lock_queue.append(inv) return True @@ -118,4 +137,15 @@ return True def on_active_changed(self, manager, state, data=None): + GObject.idle_add(self.on_active_changed_idle, state) + + def on_active_changed_idle(self, state): + self.lock_queue.reverse() + + while len(self.lock_queue) > 0: + invocation = self.lock_queue.pop() + self.interface.complete_lock(invocation) + + self.lock_queue = [] + self.interface.emit_active_changed(state) Index: cinnamon-screensaver/src/manager.py =================================================================== --- cinnamon-screensaver.orig/src/manager.py 2017-04-02 12:00:34.079811859 +0200 +++ cinnamon-screensaver/src/manager.py 2017-04-02 12:00:34.075811755 +0200 @@ -59,7 +59,7 @@ Initiate locking (activating first if necessary.) """ if not status.Active: - if self.set_active(True, msg): + if self.set_active(True, True, msg): self.stop_lock_delay() if utils.user_can_lock(): status.Locked = True @@ -76,7 +76,7 @@ status.Locked = False status.Awake = False - def set_active(self, active, msg=None): + def set_active(self, active, immediate=False, msg=None): """ Activates or deactivates the screensaver. Activation involves: - sending a request to Cinnamon to exit Overview or Expo - @@ -93,7 +93,11 @@ self.cinnamon_client.exit_expo_and_overview() if self.grab_helper.grab_root(False): if not self.stage: - self.spawn_stage(msg, c.STAGE_SPAWN_TRANSITION, self.on_spawn_stage_complete) + if immediate: + transition = 0 + else: + transition = c.STAGE_SPAWN_TRANSITION + self.spawn_stage(msg, transition, self.on_spawn_stage_complete) return True else: status.Active = False Index: cinnamon-screensaver/src/stage.py =================================================================== --- cinnamon-screensaver.orig/src/stage.py 2017-04-02 12:00:34.079811859 +0200 +++ cinnamon-screensaver/src/stage.py 2017-04-02 12:00:34.075811755 +0200 @@ -79,7 +79,6 @@ self.override_background_color (Gtk.StateFlags.NORMAL, c); self.update_geometry() - self.set_opacity(0.0) self.overlay = Gtk.Overlay() self.fader = Fader(self) @@ -135,8 +134,16 @@ """ This is the primary way of making the Stage visible. """ - self.realize() - self.fader.fade_in(effect_time, callback) + if effect_time == 0: + self.set_opacity(1.0) + + self.show() + callback() + else: + self.set_opacity(0.0) + + self.realize() + self.fader.fade_in(effect_time, callback) def transition_out(self, effect_time, callback): """
>From f579336438ae5827d84dbc5d54b77da7abcebcfa Mon Sep 17 00:00:00 2001 From: Michael Webster <miketwebs...@gmail.com> Date: Tue, 10 Jan 2017 12:26:38 -0500 Subject: [PATCH] stage.py: clear clipboards only once, when waking. raise_unlock_widget gets called repeatedly when there is input (to refresh other things) - having it repeatedly clear the clipboard was unnecessary, and prevented keyboard navigation actions that included selection of characters - such as ctrl-a, shift-home and -end. Fixes #197 --- src/stage.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) Index: cinnamon-screensaver/src/stage.py =================================================================== --- cinnamon-screensaver.orig/src/stage.py 2017-04-02 11:46:12.793587440 +0200 +++ cinnamon-screensaver/src/stage.py 2017-04-02 11:46:12.789587337 +0200 @@ -466,11 +466,12 @@ our other reveals after its transition is complete. """ self.reset_timeout() - utils.clear_clipboards(self.unlock_dialog) if status.Awake: return + utils.clear_clipboards(self.unlock_dialog) + self.clock_widget.stop_positioning() self.albumart_widget.stop_positioning()