Hello community,

here is the log from the commit of package cinnamon-screensaver for 
openSUSE:Factory checked in at 2018-07-06 10:43:40
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/cinnamon-screensaver (Old)
 and      /work/SRC/openSUSE:Factory/.cinnamon-screensaver.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "cinnamon-screensaver"

Fri Jul  6 10:43:40 2018 rev:15 rq:620928 version:3.8.2

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/cinnamon-screensaver/cinnamon-screensaver.changes    
    2018-05-11 09:17:51.987403651 +0200
+++ 
/work/SRC/openSUSE:Factory/.cinnamon-screensaver.new/cinnamon-screensaver.changes
   2018-07-06 10:43:43.243131553 +0200
@@ -1,0 +2,19 @@
+Sat Jun 16 15:48:41 UTC 2018 - [email protected]
+
+- Update to version 3.8.2:
+  * cs-notification-watcher.c: Accept int variants for the
+    transient hint.
+  * clock.py: Always initialise self.clock, whether the clock is to
+    be shown or not ("show-clock" setting,) but guard against it
+    not being an actual WallClock in set_message.
+  * cs-screen-x11.c: gdk_flush before retrieving updated monitor
+    and screen information. This is done in stage.py when
+    responding to our CsScreen's signals, but we should do it here
+    before rebuilding the monitor info for sharing with the stage.
+  * monitorView.py: Improve plugin behaviour, logging, during
+    screensaver activation/deactivation.
+  * various: Add more and improve existing logging for debug mode,
+    and implement and use a timer tracker for the deactivation idle
+    callback.
+
+-------------------------------------------------------------------

Old:
----
  cinnamon-screensaver-3.8.1.tar.gz

New:
----
  cinnamon-screensaver-3.8.2.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ cinnamon-screensaver.spec ++++++
--- /var/tmp/diff_new_pack.Wg8kDX/_old  2018-07-06 10:43:43.795130895 +0200
+++ /var/tmp/diff_new_pack.Wg8kDX/_new  2018-07-06 10:43:43.795130895 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           cinnamon-screensaver
-Version:        3.8.1
+Version:        3.8.2
 Release:        0
 Summary:        Cinnamon screensaver and locker
 License:        GPL-2.0-or-later

++++++ cinnamon-screensaver-3.8.1.tar.gz -> cinnamon-screensaver-3.8.2.tar.gz 
++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cinnamon-screensaver-3.8.1/configure.ac 
new/cinnamon-screensaver-3.8.2/configure.ac
--- old/cinnamon-screensaver-3.8.1/configure.ac 2018-05-06 16:20:45.000000000 
+0200
+++ new/cinnamon-screensaver-3.8.2/configure.ac 2018-06-08 12:38:11.000000000 
+0200
@@ -2,7 +2,7 @@
 
 AC_PREREQ(2.60)
 AC_INIT([cinnamon-screensaver],
-        [3.8.1],
+        [3.8.2],
         [https://github.com/linuxmint/cinnamon-screensaver/issues])
 
 PKG_PROG_PKG_CONFIG([0.26])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cinnamon-screensaver-3.8.1/debian/changelog 
new/cinnamon-screensaver-3.8.2/debian/changelog
--- old/cinnamon-screensaver-3.8.1/debian/changelog     2018-05-06 
16:20:45.000000000 +0200
+++ new/cinnamon-screensaver-3.8.2/debian/changelog     2018-06-08 
12:38:11.000000000 +0200
@@ -1,3 +1,15 @@
+cinnamon-screensaver (3.8.2) tara; urgency=medium
+
+  [ Michael Webster ]
+  * cs-notification-watcher.c: accept int variants for the transient hint.
+  * clock.py: Always initialize self.clock, whether the clock is to be shown 
or not ("show-clock" setting,) but guard against it not being an actual 
WallClock in set_message.
+  * cs-screen-x11.c: gdk_flush before retrieving updated monitor and screen 
information.  This is done in stage.py when responding to our CsScreen's 
signals, but we should do it here before rebuilding the monitor info for 
sharing with the stage.
+  * monitorView.py: Improve plugin behavior, logging, during screensaver 
activation/deactivation.
+  * various: Add more and improve existing logging for debug mode, and 
implement and use a timer tracker for the deactivation idle callback.
+  * debian/control: Remove python-rsvg from build deps (not available.)
+
+ -- Clement Lefebvre <[email protected]>  Fri, 08 Jun 2018 11:37:49 +0100
+
 cinnamon-screensaver (3.8.1) tara; urgency=medium
 
   [ Germán Franco ]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cinnamon-screensaver-3.8.1/debian/control 
new/cinnamon-screensaver-3.8.2/debian/control
--- old/cinnamon-screensaver-3.8.1/debian/control       2018-05-06 
16:20:45.000000000 +0200
+++ new/cinnamon-screensaver-3.8.2/debian/control       2018-06-08 
12:38:11.000000000 +0200
@@ -17,7 +17,6 @@
  libpam0g-dev,
  librsvg2-bin,
  libxext-dev,
- python-rsvg,
  python3,
 Standards-Version: 3.9.6
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/cinnamon-screensaver-3.8.1/libcscreensaver/cs-notification-watcher.c 
new/cinnamon-screensaver-3.8.2/libcscreensaver/cs-notification-watcher.c
--- old/cinnamon-screensaver-3.8.1/libcscreensaver/cs-notification-watcher.c    
2018-05-06 16:20:45.000000000 +0200
+++ new/cinnamon-screensaver-3.8.2/libcscreensaver/cs-notification-watcher.c    
2018-06-08 12:38:11.000000000 +0200
@@ -133,14 +133,37 @@
             {
                 GVariant *transient_hint;
 
-                transient_hint = g_variant_lookup_value (hints, "transient", 
NULL);
+                transient_hint = g_variant_lookup_value (hints, "transient", 
G_VARIANT_TYPE_BOOLEAN);
 
                 if (transient_hint)
                 {
                     transient = g_variant_get_boolean (transient_hint);
+                    g_variant_unref (transient_hint);
+
+                    if (debug_mode)
+                    {
+                        g_printerr ("notification has transient BOOLEAN hint: 
%s\n",
+                                    transient ? "TRUE" : "FALSE");
+                    }
                 }
+                else
+                {
+                    transient_hint = g_variant_lookup_value (hints, 
"transient", G_VARIANT_TYPE_INT32);
+
+                    if (transient_hint)
+                    {
+                        transient = g_variant_get_int32 (transient_hint);
 
-                g_clear_pointer (&transient_hint, g_variant_unref);
+                        if (debug_mode)
+                        {
+                            g_printerr ("notification has transient INT32 
hint: %d, transient: %s\n",
+                                        g_variant_get_int32 (transient_hint),
+                                        transient ? "TRUE" : "FALSE");
+                        }
+
+                        g_variant_unref (transient_hint);
+                    }
+                }
             }
 
             g_clear_pointer (&hints, g_variant_unref);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/cinnamon-screensaver-3.8.1/libcscreensaver/cs-screen-x11.c 
new/cinnamon-screensaver-3.8.2/libcscreensaver/cs-screen-x11.c
--- old/cinnamon-screensaver-3.8.1/libcscreensaver/cs-screen-x11.c      
2018-05-06 16:20:45.000000000 +0200
+++ new/cinnamon-screensaver-3.8.2/libcscreensaver/cs-screen-x11.c      
2018-06-08 12:38:11.000000000 +0200
@@ -378,6 +378,8 @@
 
     screen = CS_SCREEN (user_data);
 
+    gdk_flush ();
+
     old_monitor_infos = screen->monitor_infos;
 
     reload_monitor_infos (screen);
@@ -394,6 +396,8 @@
 
     screen = CS_SCREEN (user_data);
 
+    gdk_flush ();
+
     reload_screen_info (screen);
 
     g_signal_emit (screen, signals[SCREEN_CHANGED], 0);
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cinnamon-screensaver-3.8.1/src/clock.py 
new/cinnamon-screensaver-3.8.2/src/clock.py
--- old/cinnamon-screensaver-3.8.1/src/clock.py 2018-05-06 16:20:45.000000000 
+0200
+++ new/cinnamon-screensaver-3.8.2/src/clock.py 2018-06-08 12:38:11.000000000 
+0200
@@ -22,6 +22,8 @@
         self.get_style_context().add_class("clock")
         self.set_halign(Gtk.Align.START)
 
+        self.clock = None
+
         if not settings.get_show_clock():
             return
 
@@ -96,6 +98,9 @@
         self.label.set_alignment(0.5, 0.5)
 
     def set_message(self, msg=""):
+        if not self.clock:
+            return
+
         self.away_message = msg
         self.update_clock()
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cinnamon-screensaver-3.8.1/src/manager.py 
new/cinnamon-screensaver-3.8.2/src/manager.py
--- old/cinnamon-screensaver-3.8.1/src/manager.py       2018-05-06 
16:20:45.000000000 +0200
+++ new/cinnamon-screensaver-3.8.2/src/manager.py       2018-06-08 
12:38:11.000000000 +0200
@@ -162,15 +162,28 @@
         if not status.Active:
             return
 
+        if status.Debug and not status.Awake:
+            print("manager: user activity, waking")
+
         if status.Locked and self.stage.initialize_pam():
+            if status.Debug and not status.Awake:
+                print("manager: locked, raising unlock widget")
+
             self.stage.raise_unlock_widget()
             self.grab_helper.release_mouse()
             self.stage.maybe_update_layout()
         else:
-            GObject.idle_add(self.idle_deactivate)
+            if status.Debug:
+                print("manager: not locked, queueing idle deactivation")
+
+            trackers.timer_tracker_get().add_idle("idle-deactivate",
+                                                  self.idle_deactivate)
 
     def idle_deactivate(self):
         self.set_active(False)
+
+        trackers.timer_tracker_get().cancel("idle-deactivate")
+
         return False
 
     def spawn_stage(self, away_message, effect_time=c.STAGE_SPAWN_TRANSITION, 
callback=None):
@@ -278,6 +291,9 @@
         """
         Updates the lock status when our timer has hit its limit
         """
+        if status.Debug:
+            print("manager: locking after delay ('lock-delay')")
+
         status.Locked = True
 
         return False
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cinnamon-screensaver-3.8.1/src/monitorView.py 
new/cinnamon-screensaver-3.8.2/src/monitorView.py
--- old/cinnamon-screensaver-3.8.1/src/monitorView.py   2018-05-06 
16:20:45.000000000 +0200
+++ new/cinnamon-screensaver-3.8.2/src/monitorView.py   2018-06-08 
12:38:11.000000000 +0200
@@ -146,6 +146,9 @@
         when it receives a SIGTERM.
         """
         if self.proc:
+            if status.Debug:
+                print("monitorView: killing plugin")
+
             self.proc.send_signal(signal.SIGTERM)
             self.proc = None
 
@@ -154,13 +157,14 @@
         Attempt to retreive the current plug-in info and spawn
         a script to instantiate it.
         """
+
+        if status.Debug:
+            print("monitorView: show plugin")
+
         name = settings.get_screensaver_name()
         path = utils.lookup_plugin_path(name)
         if path is not None:
             self.spawn_plugin(path)
-            trackers.con_tracker_get().connect(self.socket,
-                                               "plug-added",
-                                               self.on_plug_added)
 
     def on_plug_added(self, socket, data=None):
         """
@@ -189,6 +193,9 @@
         """
         status.PluginRunning = False
 
+        if status.Debug:
+            print("monitorView: show wallpaper")
+
         if self.stack.get_visible_child_name() == "wallpaper":
             self.emit("current-view-change-complete")
             return
@@ -214,34 +221,66 @@
                                                   
self.notify_transition_callback)
             self.emit("current-view-change-complete")
 
-    def update_view(self, awake, low_power):
+    def update_view(self, widget=None, data=None):
         """
         Syncs the current MonitorView state to whatever is appropriate, 
depending
         on whether we're awake and whether a plugin should be visible instead.
         """
         self.kill_plugin()
 
-        if not awake and not low_power and settings.should_show_plugin():
+        if status.Debug:
+            print("monitorView: updating view state")
+
+        trackers.con_tracker_get().disconnect(self.socket,
+                                              "hierarchy-changed",
+                                              self.show_plugin)
+
+        if not status.Awake and status.shouldShowPlugin():
             self.show_plugin()
         else:
             self.show_wallpaper()
 
+    def socket_is_anchored(self, socket):
+        toplevel = self.socket.get_toplevel()
+
+        is_toplevel = isinstance(toplevel, Gtk.Window)
+
+        if status.Debug:
+            print("monitorView: socket anchor check:", is_toplevel)
+
+        return is_toplevel
+
     def spawn_plugin(self, path):
         """
         Spawns the plug-in script and watches its STDOUT for a window ID to 
use for
         our GtkSocket.  We hold a reference to it so that we can terminate it 
properly
         later.
         """
-        try:
-            self.proc = Gio.Subprocess.new((path, None),
-                                           Gio.SubprocessFlags.STDOUT_PIPE | 
Gio.SubprocessFlags.STDERR_SILENCE)
-
-            pipe = self.proc.get_stdout_pipe()
-            pipe.read_bytes_async(4096, GLib.PRIORITY_DEFAULT, None, 
self.on_bytes_read)
+        if self.socket_is_anchored(self.socket):
+            try:
+                if status.Debug:
+                    print("monitorView: spawning plugin process: %s" % path)
+
+                trackers.con_tracker_get().connect(self.socket,
+                                                   "plug-added",
+                                                   self.on_plug_added)
+
+                self.proc = Gio.Subprocess.new((path, None),
+                                               Gio.SubprocessFlags.STDOUT_PIPE 
| Gio.SubprocessFlags.STDERR_SILENCE)
+
+                pipe = self.proc.get_stdout_pipe()
+                pipe.read_bytes_async(4096, GLib.PRIORITY_DEFAULT, None, 
self.on_bytes_read)
+
+            except Exception as e:
+                print(e)
+                return
+        else:
+            if status.Debug:
+                print("monitorView: socket not anchored, waiting on toplevel 
change")
 
-        except Exception as e:
-            print(e)
-            return
+            trackers.con_tracker_get().connect(self.socket,
+                                               "hierarchy-changed",
+                                               self.update_view)
 
     def on_bytes_read(self, pipe, res):
         bytes_read = pipe.read_bytes_finish(res)
@@ -253,4 +292,12 @@
             if output:
                 match = re.match('^\s*WINDOW ID=(\d+)\s*$', output)
                 if match:
-                    self.socket.add_id(int(match.group(1)))
+                    # We might have gotten a wake between spawning the plugin
+                    # and receiving the window id
+                    xid = int(match.group(1))
+                    if status.Debug:
+                        print("monitorView: received window id from plugin: 
%d" % xid)
+                    if self.socket_is_anchored(self.socket):
+                        self.socket.add_id(xid)
+                    else:
+                        self.kill_plugin()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/cinnamon-screensaver-3.8.1/src/pamhelper/authClient.py 
new/cinnamon-screensaver-3.8.2/src/pamhelper/authClient.py
--- old/cinnamon-screensaver-3.8.1/src/pamhelper/authClient.py  2018-05-06 
16:20:45.000000000 +0200
+++ new/cinnamon-screensaver-3.8.2/src/pamhelper/authClient.py  2018-06-08 
12:38:11.000000000 +0200
@@ -32,12 +32,12 @@
         self.in_pipe = None
 
     def initialize(self):
-        if status.Debug:
-            print("authClient initialize... initialized already: %s" % 
str(self.initialized))
-
         if self.initialized:
             return True
 
+        if status.Debug:
+            print("authClient: attempting to initialize")
+
         try:
             helper_path = None
             architecture = platform.machine()
@@ -61,7 +61,7 @@
                     break
 
             if helper_path is None:
-                print ("Critical Error: PAM Helper could not be found!")
+                print ("authClient: critical Error: PAM Helper could not be 
found!")
 
             if status.Debug:
                 argv = (helper_path, "--debug", None)
@@ -76,7 +76,7 @@
                                                
Gio.SubprocessFlags.STDERR_SILENCE)
 
         except GLib.Error as e:
-            print("error starting cinnamon-screensaver-pam-helper: %s" % 
e.message)
+            print("authClient: error starting cinnamon-screensaver-pam-helper: 
%s" % e.message)
             return False
 
         self.proc.wait_check_async(None, self.on_proc_completed, None)
@@ -88,6 +88,9 @@
 
         self.initialized = True
 
+        if status.Debug:
+            print("authClient: initialized")
+
         return True
 
     def cancel(self):
@@ -95,11 +98,11 @@
             self.message_to_child("CS_PAM_AUTH_REQUEST_SUBPROCESS_EXIT\n");
         else:
             if status.Debug:
-                print("authClient cancel requested, but no helper process")
+                print("authClient: cancel requested, but no helper process")
 
     def on_proc_completed(self, proc, res, data=None):
         if status.Debug:
-            print("authClient helper process completed...")
+            print("authClient: helper process completed...")
         try:
             ret = proc.wait_check_finish(res)
         except GLib.Error as e:
@@ -132,7 +135,7 @@
             return
 
         if status.Debug:
-            print("authClient message to child")
+            print("authClient: message to child")
 
         try:
             b = GLib.Bytes.new(string.encode())
@@ -176,25 +179,25 @@
 
     def emit_idle_busy_state(self, busy):
         if status.Debug:
-            print("authClient idle add auth-busy")
+            print("authClient: idle add auth-busy")
         GObject.idle_add(self.emit, "auth-busy", busy)
 
     def emit_idle_failure(self):
         if status.Debug:
-            print("authClient idle add failure")
+            print("authClient: idle add failure")
         GObject.idle_add(self.emit, "auth-failure")
 
     def emit_idle_success(self):
         if status.Debug:
-            print("authClient idle add success")
+            print("authClient: idle add success")
         GObject.idle_add(self.emit, "auth-success")
 
     def emit_idle_cancel(self):
         if status.Debug:
-            print("authClient idle add cancel")
+            print("authClient: idle add cancel")
         GObject.idle_add(self.emit, "auth-cancel")
 
     def emit_idle_auth_prompt(self, prompt):
         if status.Debug:
-            print("authClient idle add auth-prompt")
+            print("authClient: idle add auth-prompt")
         GObject.idle_add(self.emit, "auth-prompt", prompt)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cinnamon-screensaver-3.8.1/src/stage.py 
new/cinnamon-screensaver-3.8.2/src/stage.py
--- old/cinnamon-screensaver-3.8.1/src/stage.py 2018-05-06 16:20:45.000000000 
+0200
+++ new/cinnamon-screensaver-3.8.2/src/stage.py 2018-06-08 12:38:11.000000000 
+0200
@@ -436,6 +436,9 @@
                                            "current-view-change-complete",
                                            self.after_power_state_changed)
 
+        if status.Debug:
+            print("stage: Power state changed, updating monitor views")
+
         self.update_monitor_views()
 
     def after_power_state_changed(self, monitor):
@@ -462,7 +465,7 @@
 
         self.floaters.append(self.clock_widget)
 
-        if (not settings.should_show_plugin()) or 
(settings.should_show_plugin() and not self.power_client.plugged_in):
+        if not status.shouldShowPlugin():
             if settings.get_show_clock():
                 self.clock_widget.start_positioning()
 
@@ -480,7 +483,7 @@
 
         self.floaters.append(self.clock_widget)
 
-        if (not settings.should_show_plugin()) or 
(settings.should_show_plugin() and not self.power_client.plugged_in):
+        if not status.shouldShowPlugin():
             if settings.get_show_albumart():
                 self.albumart_widget.start_positioning()
 
@@ -729,9 +732,8 @@
         Updates all of our MonitorViews based on the power
         or Awake states.
         """
-        low_power = not self.power_client.plugged_in
         if not status.Awake:
-            if (not settings.should_show_plugin()) or 
(settings.should_show_plugin() and low_power):
+            if (not status.shouldShowPlugin()):
                 if self.clock_widget != None and settings.get_show_clock():
                     self.clock_widget.start_positioning()
                 if self.albumart_widget != None and 
settings.get_show_albumart():
@@ -745,7 +747,7 @@
                     self.albumart_widget.hide()
 
         for monitor in self.monitors:
-            monitor.update_view(status.Awake, low_power)
+            monitor.update_view()
 
             if not monitor.get_reveal_child():
                 monitor.reveal()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cinnamon-screensaver-3.8.1/src/status.py 
new/cinnamon-screensaver-3.8.2/src/status.py
--- old/cinnamon-screensaver-3.8.1/src/status.py        2018-05-06 
16:20:45.000000000 +0200
+++ new/cinnamon-screensaver-3.8.2/src/status.py        2018-06-08 
12:38:11.000000000 +0200
@@ -11,8 +11,13 @@
 # This helps the Stage decide whether to show the clock widget or not while 
not Awake.
 # You get all sorts of artifacts trying to draw widgets over the x plugins
 PluginRunning = False
+# Our test for whether we should be showing the plugin:  If it's the user's 
preference
+# and if we're on ac power.
+def shouldShowPlugin():
+    from util import settings
+    import singletons
 
-# Set by command line args
+    return settings.should_show_plugin() and singletons.UPowerClient.plugged_in
 
 # This is different than the preference that turns off locking - that only 
prevents idle locking.  The
 # user can still lock explicitly.  The function checks for the existence of 
correct PAM files,
@@ -20,6 +25,8 @@
 LockEnabled = True
 
 # Enables extra PAM/authentication/notification debugging
+# TODO: We do a *lot* of logging now, we should just use a debug() function 
that checks
+# for debug mode internally, instead of 'if status.Debug' everywhere.
 Debug = False
 
 # Forces the Stage to only cover a single monitor and launch a GtkInspector 
window.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/cinnamon-screensaver-3.8.1/src/util/trackers.py 
new/cinnamon-screensaver-3.8.2/src/util/trackers.py
--- old/cinnamon-screensaver-3.8.1/src/util/trackers.py 2018-05-06 
16:20:45.000000000 +0200
+++ new/cinnamon-screensaver-3.8.2/src/util/trackers.py 2018-06-08 
12:38:11.000000000 +0200
@@ -57,6 +57,13 @@
 
         self.timers[name] = timeout_id
 
+    def add_idle(self, name, callback, *args):
+        self.cancel(name)
+        idle_id = GObject.idle_add(self.do_callback, callback, name, *args)
+        debug_timers("adding idle callback of name", name, "callback", 
str(callback), "id", idle_id)
+
+        self.timers[name] = idle_id
+
     def cancel(self, name):
         try:
             if self.timers[name]:


Reply via email to