Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package libxfce4ui for openSUSE:Factory 
checked in at 2023-05-30 22:00:52
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libxfce4ui (Old)
 and      /work/SRC/openSUSE:Factory/.libxfce4ui.new.1533 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "libxfce4ui"

Tue May 30 22:00:52 2023 rev:44 rq:1089481 version:4.18.4

Changes:
--------
--- /work/SRC/openSUSE:Factory/libxfce4ui/libxfce4ui.changes    2023-04-02 
19:16:57.624398308 +0200
+++ /work/SRC/openSUSE:Factory/.libxfce4ui.new.1533/libxfce4ui.changes  
2023-05-30 22:00:54.718469104 +0200
@@ -1,0 +2,18 @@
+Mon May 22 17:55:50 UTC 2023 - Manfred Hollstein <manfre...@gmx.net>
+
+- Update to version 4.18.4
+  * Prevent recursive calling of lock command
+  * Add lock-on-sleep property
+  * Update fallback list
+  * Prioritize user lock command
+  * Rewrite D-Bus proxies management
+  * Use reasonable timeout for methods that may not reply
+  * Remove support for gnome-screensaver (Fixes #62)
+  * Do not take into account empty commands
+  * Simplify Xfconf management
+  * Fix memory leak
+  * Fix typos
+  * Run lock command synchronously (Fixes #70)
+  * Add missing include guard
+
+-------------------------------------------------------------------

Old:
----
  libxfce4ui-4.18.3.tar.bz2

New:
----
  libxfce4ui-4.18.4.tar.bz2

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

Other differences:
------------------
++++++ libxfce4ui.spec ++++++
--- /var/tmp/diff_new_pack.eGsyMc/_old  2023-05-30 22:00:55.234472144 +0200
+++ /var/tmp/diff_new_pack.eGsyMc/_new  2023-05-30 22:00:55.238472168 +0200
@@ -19,7 +19,7 @@
 %bcond_with git
 
 Name:           libxfce4ui
-Version:        4.18.3
+Version:        4.18.4
 Release:        0
 Summary:        Widgets Library for the Xfce Desktop Environment
 License:        LGPL-2.1-or-later
@@ -131,8 +131,8 @@
 
 
 
-# this should be replaced by %%lang_package once bnc#513786 is resolved
 
+# this should be replaced by %%lang_package once bnc#513786 is resolved
 %package lang
 Summary:        Languages for package %{name}
 License:        LGPL-2.1-or-later

++++++ libxfce4ui-4.18.3.tar.bz2 -> libxfce4ui-4.18.4.tar.bz2 ++++++
++++ 3527 lines of diff (skipped)
++++    retrying with extended exclude list
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libxfce4ui-4.18.3/ChangeLog new/libxfce4ui-4.18.4/ChangeLog
--- old/libxfce4ui-4.18.3/ChangeLog     2023-03-28 19:12:21.000000000 +0200
+++ new/libxfce4ui-4.18.4/ChangeLog     2023-05-22 18:56:09.000000000 +0200
@@ -1,3 +1,140 @@
+commit 0f4eb4af1dbdd00ed808c3d0700b324f37d60e4c
+Author: Gaël Bonithon <g...@xfce.org>
+Date:   Wed May 17 11:00:59 2023 +0200
+
+    screensaver: Prevent recursive calling of lock command
+    
+    This is not intended to prevent a malicious attack but an accidental
+    recursive call. When xfce4-session!41 is merged, this will allow in
+    particular to address xfce4-session#120 in this sense. The original idea
+    is from Jarno Suni in xfce4-session!20.
+    
+    (cherry picked from commit 1678d6082c5032a8bf9da591c7251ee8452e7250)
+
+commit b00fb0804124119e5b732d919d04971dd663d8b3
+Author: Gaël Bonithon <g...@xfce.org>
+Date:   Sun May 14 15:53:57 2023 +0200
+
+    screensaver: Add lock-on-sleep property
+    
+    This is to keep in sync components having this setting under one name
+    or another.
+    
+    Related: xfce4-power-manager#71
+    (cherry picked from commit a234e63495e98598d38139e11f2b653c5f63fb43)
+
+commit 943e2a927e204b68a56cd49c6011a7d18f9e0b74
+Author: Gaël Bonithon <g...@xfce.org>
+Date:   Fri May 12 12:20:11 2023 +0200
+
+    screensaver: Update fallback list
+    
+    Remove xflock4 since it is redundant and this code could replace it in
+    the future (or not).
+    
+    (cherry picked from commit 3d38ce96b63ac7c7e67d63461c453688d026be2c)
+
+commit ebd9d03ee238ef3ccf7c87f9c85e9a4633d954d1
+Author: Gaël Bonithon <g...@xfce.org>
+Date:   Fri May 12 11:18:57 2023 +0200
+
+    screensaver: Prioritize user lock command
+    
+    (cherry picked from commit d381731a8e68e72ae84354d08b9cfe1d47581860)
+
+commit 9331a6f1e9f8916e0282f4165a157cf756f76ffa
+Author: Gaël Bonithon <g...@xfce.org>
+Date:   Fri May 12 10:14:53 2023 +0200
+
+    screensaver: Rewrite D-Bus proxies management
+    
+    * Do not autostart proxies at initialization
+    * Monitor all proxies, properly update running state
+    * Use only one of them: the highest priority
+    * Do not start another one if the current one fails to lock
+    
+    Fixes: #63, #64
+    (cherry picked from commit a25f036b656546f2d5ad840ea2aa1a49d8ece232)
+
+commit b07efc88bbb682cf8a9a962b5578b143f78761cc
+Author: Gaël Bonithon <g...@xfce.org>
+Date:   Fri May 12 21:04:37 2023 +0200
+
+    screensaver: Use reasonable timeout for methods that may not reply
+    
+    Helps: #62, #63
+    (cherry picked from commit 877226ca89e4df4192a85b37a8804b819c07121f)
+
+commit 4bf9d5aae572bad7298bc8bba7ae927e25d03ee8
+Author: Gaël Bonithon <g...@xfce.org>
+Date:   Thu May 11 20:42:58 2023 +0200
+
+    screensaver: Remove support for gnome-screensaver (Fixes #62)
+    
+    (cherry picked from commit 3d15064e500cb683188adb5d613b8ca21241b2a5)
+
+commit 71b533628c5124f8ddab21e19ee5ee025372ea35
+Author: Gaël Bonithon <g...@xfce.org>
+Date:   Fri May 12 11:59:20 2023 +0200
+
+    screensaver: Do not take into account empty commands
+    
+    (cherry picked from commit 4a1067561eddf35b1df635c33b2935dcfddbc587)
+
+commit 4ecabf14a8feb4f88f4b233a02d887d071abf74f
+Author: Gaël Bonithon <g...@xfce.org>
+Date:   Fri May 12 00:10:12 2023 +0200
+
+    screensaver: Simplify Xfconf management
+    
+    (cherry picked from commit 8b947d87b3d1365fc888791631420728af6644e7)
+
+commit 8ed6cefc1869d255d969773a542b7a3f7340c125
+Author: Gaël Bonithon <g...@xfce.org>
+Date:   Thu May 11 19:18:11 2023 +0200
+
+    screensaver: Fix memory leak
+    
+    (cherry picked from commit 68d465e72fa8c9461e5febcc1ed015d7ab310e74)
+
+commit 67ab9538729d79bfbbca391f38c91d3bceb60fb0
+Author: Gaël Bonithon <g...@xfce.org>
+Date:   Thu May 11 19:17:52 2023 +0200
+
+    screensaver: Fix typos
+    
+    (cherry picked from commit 31baf6ac8ca03610cfe0a78333cc332a9d407845)
+
+commit bc4f3c5ad51a2a10e01c7672c8b5927fadb508df
+Author: Gaël Bonithon <g...@xfce.org>
+Date:   Sun May 7 18:14:16 2023 +0200
+
+    screensaver: Run lock command synchronously (Fixes #70)
+    
+    (cherry picked from commit 32f761266658e2f59093af259655e44efecf31a9)
+
+commit 070a2116815d3c917abcb8a04a80f8d428e29f38
+Author: Gaël Bonithon <g...@xfce.org>
+Date:   Tue May 2 12:34:33 2023 +0200
+
+    screensaver: Add missing include guard
+    
+    Fixes: e53afab3215a1dc58f74919fe7f94d8831d6a59f
+    Related: !89
+    (cherry picked from commit e998988f5ca17fea57c78e5fa3ada65cdc0ea351)
+
+commit 9d04648894af469a048a8638a216afe397a96fef
+Author: Gaël Bonithon <g...@xfce.org>
+Date:   Tue Mar 28 19:20:07 2023 +0200
+
+    Back to development
+
+commit 62094afee4500659601e5c7bba31b9d56679dfbd
+Author: Gaël Bonithon <g...@xfce.org>
+Date:   Tue Mar 28 19:19:35 2023 +0200
+
+    Updates for release
+
 commit 6c89cb5e1be20e2ab7fcef720f1869387a76aca9
 Author: Arthur Demchenkov <spinal...@gmail.com>
 Date:   Wed Mar 22 16:52:17 2023 +0300
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libxfce4ui-4.18.3/NEWS new/libxfce4ui-4.18.4/NEWS
--- old/libxfce4ui-4.18.3/NEWS  2023-03-28 19:10:16.000000000 +0200
+++ new/libxfce4ui-4.18.4/NEWS  2023-05-22 18:52:23.000000000 +0200
@@ -1,3 +1,19 @@
+4.18.4 (2023-05-22)
+======
+- screensaver: Prevent recursive calling of lock command
+- screensaver: Add lock-on-sleep property
+- screensaver: Update fallback list
+- screensaver: Prioritize user lock command
+- screensaver: Rewrite D-Bus proxies management
+- screensaver: Use reasonable timeout for methods that may not reply
+- screensaver: Remove support for gnome-screensaver (Fixes #62)
+- screensaver: Do not take into account empty commands
+- screensaver: Simplify Xfconf management
+- screensaver: Fix memory leak
+- screensaver: Fix typos
+- screensaver: Run lock command synchronously (Fixes #70)
+- screensaver: Add missing include guard
+
 4.18.3 (2023-03-28)
 ======
 - Add comment about the need for gtk_widget_destroy()
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libxfce4ui-4.18.3/configure.ac new/libxfce4ui-4.18.4/configure.ac
--- old/libxfce4ui-4.18.3/configure.ac  2023-03-28 19:10:20.000000000 +0200
+++ new/libxfce4ui-4.18.4/configure.ac  2023-05-22 18:52:38.000000000 +0200
@@ -14,9 +14,9 @@
 m4_define([libxfce4ui_version_api], [2])
 m4_define([libxfce4ui_version_major], [4])
 m4_define([libxfce4ui_version_minor], [18])
-m4_define([libxfce4ui_version_micro], [3])
+m4_define([libxfce4ui_version_micro], [4])
 m4_define([libxfce4ui_version_nano], []) dnl leave this empty to have no nano 
version
-m4_define([libxfce4ui_version_build], [6c89cb5])
+m4_define([libxfce4ui_version_build], [0f4eb4a])
 m4_define([libxfce4ui_version_tag], [])
 m4_define([libxfce4ui_version], 
[libxfce4ui_version_major().libxfce4ui_version_minor().libxfce4ui_version_micro()ifelse(libxfce4ui_version_nano(),
 [], [], [.libxfce4ui_version_nano()])ifelse(libxfce4ui_version_tag(), [git], 
[libxfce4ui_version_tag()-libxfce4ui_version_build()], 
[libxfce4ui_version_tag()])])
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libxfce4ui-4.18.3/docs/reference/html/XfceScreensaver.html 
new/libxfce4ui-4.18.4/docs/reference/html/XfceScreensaver.html
--- old/libxfce4ui-4.18.3/docs/reference/html/XfceScreensaver.html      
2023-03-28 19:14:48.000000000 +0200
+++ new/libxfce4ui-4.18.4/docs/reference/html/XfceScreensaver.html      
2023-05-22 18:58:29.000000000 +0200
@@ -89,6 +89,11 @@
 <td class="property_name"><a class="link" 
href="XfceScreensaver.html#XfceScreensaver--lock-command" title="The 
“lock-command” property">lock-command</a></td>
 <td class="property_flags">Read / Write / Construct</td>
 </tr>
+<tr>
+<td class="property_type"><a 
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span 
class="type">gboolean</span></a></td>
+<td class="property_name"><a class="link" 
href="XfceScreensaver.html#XfceScreensaver--lock-on-sleep" title="The 
“lock-on-sleep” property">lock-on-sleep</a></td>
+<td class="property_flags">Read / Write / Construct</td>
+</tr>
 </tbody>
 </table></div>
 </div>
@@ -125,7 +130,7 @@
 <a name="xfce-screensaver-new"></a><h3>xfce_screensaver_new ()</h3>
 <pre class="programlisting"><a class="link" href="XfceScreensaver.html" 
title="XfceScreensaver"><span class="returnvalue">XfceScreensaver</span></a> *
 xfce_screensaver_new (<em class="parameter"><code><span 
class="type">void</span></code></em>);</pre>
-<p>Creates a new <a class="link" href="XfceScreensaver.html" 
title="XfceScreensaver"><span class="type">XfceScreensaver</span></a> object or 
increases the refrence count
+<p>Creates a new <a class="link" href="XfceScreensaver.html" 
title="XfceScreensaver"><span class="type">XfceScreensaver</span></a> object or 
increases the reference count
 of the current object.</p>
 <div class="refsect3">
 <a name="xfce-screensaver-new.returns"></a><h4>Returns</h4>
@@ -164,7 +169,7 @@
 </tr>
 <tr>
 <td class="parameter_name"><p>inhibit</p></td>
-<td class="parameter_description"><p>wether to inhibit the screensaver from 
activating.</p></td>
+<td class="parameter_description"><p>whether to inhibit the screensaver from 
activating</p></td>
 <td class="parameter_annotations"> </td>
 </tr>
 </tbody>
@@ -214,19 +219,28 @@
 <div class="refsect2">
 <a name="XfceScreensaver--heartbeat-command"></a><h3>The <code 
class="literal">“heartbeat-command”</code> property</h3>
 <pre class="programlisting">  “heartbeat-command”        <span 
class="type">char</span> *</pre>
-<p>Inhibit the screensaver from activating, i.e. xscreensaver-command 
-deactivate.</p>
+<p>Inhibit the screensaver from activating, e.g. xscreensaver-command 
--deactivate.</p>
 <p>Owner: XfceScreensaver</p>
 <p>Flags: Read / Write / Construct</p>
-<p>Default value: "xscreensaver-command -deactivate"</p>
+<p>Default value: NULL</p>
 </div>
 <hr>
 <div class="refsect2">
 <a name="XfceScreensaver--lock-command"></a><h3>The <code 
class="literal">“lock-command”</code> property</h3>
 <pre class="programlisting">  “lock-command”             <span 
class="type">char</span> *</pre>
-<p>Lock the desktop, i.e. xscreensaver-command -lock.</p>
+<p>Lock the desktop, e.g. xscreensaver-command --lock.</p>
+<p>Owner: XfceScreensaver</p>
+<p>Flags: Read / Write / Construct</p>
+<p>Default value: NULL</p>
+</div>
+<hr>
+<div class="refsect2">
+<a name="XfceScreensaver--lock-on-sleep"></a><h3>The <code 
class="literal">“lock-on-sleep”</code> property</h3>
+<pre class="programlisting">  “lock-on-sleep”            <a 
href="/usr/share/gtk-doc/html/glib/glib-Basic-Types.html#gboolean"><span 
class="type">gboolean</span></a></pre>
+<p>Whether to lock before suspend/hibernate.</p>
 <p>Owner: XfceScreensaver</p>
 <p>Flags: Read / Write / Construct</p>
-<p>Default value: "xscreensaver-command -lock"</p>
+<p>Default value: FALSE</p>
 </div>
 </div>
 </div>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libxfce4ui-4.18.3/docs/reference/html/api-index-full.html 
new/libxfce4ui-4.18.4/docs/reference/html/api-index-full.html
--- old/libxfce4ui-4.18.3/docs/reference/html/api-index-full.html       
2023-03-28 19:14:48.000000000 +0200
+++ new/libxfce4ui-4.18.4/docs/reference/html/api-index-full.html       
2023-05-22 18:58:29.000000000 +0200
@@ -316,6 +316,10 @@
 </dt>
 <dd></dd>
 <dt>
+<a class="link" href="XfceScreensaver.html#XfceScreensaver--lock-on-sleep" 
title="The “lock-on-sleep” property">XfceScreensaver:lock-on-sleep</a>, 
object property in <a class="link" href="XfceScreensaver.html" 
title="XfceScreensaver">XfceScreensaver</a>
+</dt>
+<dd></dd>
+<dt>
 <a class="link" href="XfceScreensaver.html#xfce-screensaver-inhibit" 
title="xfce_screensaver_inhibit ()">xfce_screensaver_inhibit</a>, function in 
<a class="link" href="XfceScreensaver.html" 
title="XfceScreensaver">XfceScreensaver</a>
 </dt>
 <dd></dd>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libxfce4ui-4.18.3/docs/reference/html/index.html 
new/libxfce4ui-4.18.4/docs/reference/html/index.html
--- old/libxfce4ui-4.18.3/docs/reference/html/index.html        2023-03-28 
19:14:48.000000000 +0200
+++ new/libxfce4ui-4.18.4/docs/reference/html/index.html        2023-05-22 
18:58:29.000000000 +0200
@@ -15,7 +15,7 @@
 <div>
 <div><table class="navigation" id="top" width="100%" cellpadding="2" 
cellspacing="0"><tr><th valign="middle"><p class="title">libxfce4ui Reference 
Manual</p></th></tr></table></div>
 <div><p class="releaseinfo">
-      For libxfce4ui 4.18.3.
+      For libxfce4ui 4.18.4.
       The latest version of this documentation can be found on-line at
       <a class="ulink" href="https://developer.xfce.org/libxfce4ui/index.html"; 
target="_top">https://developer.xfce.org/libxfce4ui/</a>.
     </p></div>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libxfce4ui-4.18.3/docs/reference/html/libxfce4ui-libxfce4ui-config.html 
new/libxfce4ui-4.18.4/docs/reference/html/libxfce4ui-libxfce4ui-config.html
--- old/libxfce4ui-4.18.3/docs/reference/html/libxfce4ui-libxfce4ui-config.html 
2023-03-28 19:14:48.000000000 +0200
+++ new/libxfce4ui-4.18.4/docs/reference/html/libxfce4ui-libxfce4ui-config.html 
2023-05-22 18:58:29.000000000 +0200
@@ -210,7 +210,7 @@
 </tr>
 <tr>
 <td class="parameter_name"><p>micro</p></td>
-<td class="parameter_description"><p>The micro release of the library, i.e. 
3</p></td>
+<td class="parameter_description"><p>The micro release of the library, i.e. 
4</p></td>
 <td class="parameter_annotations"> </td>
 </tr>
 </tbody>
@@ -259,7 +259,7 @@
 <hr>
 <div class="refsect2">
 <a name="LIBXFCE4UI-MICRO-VERSION:CAPS"></a><h3>LIBXFCE4UI_MICRO_VERSION</h3>
-<pre class="programlisting">#define LIBXFCE4UI_MICRO_VERSION (3)
+<pre class="programlisting">#define LIBXFCE4UI_MICRO_VERSION (4)
 </pre>
 <p>A macro that evaluates to the micro version of libxfce4ui, in a format
 that can be used by the C pre-processor.</p>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libxfce4ui-4.18.3/docs/reference/html/libxfce4ui.devhelp2 
new/libxfce4ui-4.18.4/docs/reference/html/libxfce4ui.devhelp2
--- old/libxfce4ui-4.18.3/docs/reference/html/libxfce4ui.devhelp2       
2023-03-28 19:14:47.000000000 +0200
+++ new/libxfce4ui-4.18.4/docs/reference/html/libxfce4ui.devhelp2       
2023-05-22 18:58:28.000000000 +0200
@@ -155,6 +155,7 @@
     <keyword type="struct" name="XfceScreensaver" 
link="XfceScreensaver.html#XfceScreensaver-struct"/>
     <keyword type="property" name="The “heartbeat-command” property" 
link="XfceScreensaver.html#XfceScreensaver--heartbeat-command"/>
     <keyword type="property" name="The “lock-command” property" 
link="XfceScreensaver.html#XfceScreensaver--lock-command"/>
+    <keyword type="property" name="The “lock-on-sleep” property" 
link="XfceScreensaver.html#XfceScreensaver--lock-on-sleep"/>
     <keyword type="constant" name="XFCE_GTK_MENU_ITEM" 
link="libxfce4ui-Gtk-Extensions.html#XFCE-GTK-MENU-ITEM:CAPS"/>
     <keyword type="constant" name="XFCE_GTK_IMAGE_MENU_ITEM" 
link="libxfce4ui-Gtk-Extensions.html#XFCE-GTK-IMAGE-MENU-ITEM:CAPS"/>
     <keyword type="constant" name="XFCE_GTK_CHECK_MENU_ITEM" 
link="libxfce4ui-Gtk-Extensions.html#XFCE-GTK-CHECK-MENU-ITEM:CAPS"/>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libxfce4ui-4.18.3/libxfce4ui/libxfce4ui-config.h 
new/libxfce4ui-4.18.4/libxfce4ui/libxfce4ui-config.h
--- old/libxfce4ui-4.18.3/libxfce4ui/libxfce4ui-config.h        2023-03-28 
19:12:19.000000000 +0200
+++ new/libxfce4ui-4.18.4/libxfce4ui/libxfce4ui-config.h        2023-05-22 
18:56:01.000000000 +0200
@@ -53,13 +53,13 @@
  * that can be used by the C pre-processor.
  *
  */
-#define LIBXFCE4UI_MICRO_VERSION (3)
+#define LIBXFCE4UI_MICRO_VERSION (4)
 
 /**
  * LIBXFCE4UI_CHECK_VERSION:
  * @major : The major version of the library, i.e. 4
  * @minor : The minor version of the library, i.e. 18
- * @micro : The micro release of the library, i.e. 3
+ * @micro : The micro release of the library, i.e. 4
  *
  * A macro to compare libxfce4ui versions to determine if a particular
  * function is available.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libxfce4ui-4.18.3/libxfce4ui/xfce-screensaver.c 
new/libxfce4ui-4.18.4/libxfce4ui/xfce-screensaver.c
--- old/libxfce4ui-4.18.3/libxfce4ui/xfce-screensaver.c 2023-03-14 
17:01:43.000000000 +0100
+++ new/libxfce4ui-4.18.4/libxfce4ui/xfce-screensaver.c 2023-05-17 
21:16:35.000000000 +0200
@@ -38,14 +38,8 @@
 
 
 
-#define HEARTBEAT_COMMAND       "heartbeat-command"
-#define LOCK_COMMAND            "lock-command"
-#define XFPM_CHANNEL            "xfce4-power-manager"
-#define XFPM_PROPERTIES_PREFIX  "/xfce4-power-manager/"
-#define XFSM_CHANNEL            "xfce4-session"
-#define XFSM_PROPERTIES_PREFIX  "/general/"
+#define NO_REPLY_TIMEOUT 2000
 
-static void      xfce_screensaver_finalize        (GObject         *object);
 static void      xfce_screensaver_get_property    (GObject         *object,
                                                    guint            
property_id,
                                                    GValue          *value,
@@ -54,41 +48,58 @@
                                                    guint            
property_id,
                                                    const GValue    *value,
                                                    GParamSpec      *pspec);
+static void      xfce_screensaver_constructed     (GObject         *object);
+static void      xfce_screensaver_finalize        (GObject         *object);
 
 
 
+/* in order of priority, used to browse the screensaver array below */
 typedef enum
 {
-  SCREENSAVER_TYPE_NONE,
-  SCREENSAVER_TYPE_FREEDESKTOP,
+  SCREENSAVER_TYPE_XFCE,
   SCREENSAVER_TYPE_CINNAMON,
   SCREENSAVER_TYPE_MATE,
-  SCREENSAVER_TYPE_GNOME,
-  SCREENSAVER_TYPE_XFCE,
-  SCREENSAVER_TYPE_OTHER,
-  N_SCREENSAVER_TYPE
+  SCREENSAVER_TYPE_FREEDESKTOP,
+  SCREENSAVER_TYPE_OTHER
 } ScreensaverType;
 
 enum
 {
   PROP_0 = 0,
   PROP_HEARTBEAT_COMMAND,
-  PROP_LOCK_COMMAND
+  PROP_LOCK_COMMAND,
+  PROP_LOCK_ON_SLEEP,
 };
 
 struct _XfceScreensaver
 {
   GObject parent;
 
-  guint cookie;
-  gchar *heartbeat_command;
-  gchar *lock_command;
-  GDBusProxy *proxy;
+  GDBusProxy *proxies[SCREENSAVER_TYPE_OTHER];
   guint screensaver_id;
+  guint cookie;
   ScreensaverType screensaver_type;
+
   gboolean xfconf_initialized;
-  XfconfChannel *xfpm_channel;
-  XfconfChannel *xfsm_channel;
+  gchar *heartbeat_command;
+  gchar *lock_command;
+  gboolean lock_on_sleep;
+};
+
+typedef struct
+{
+  const gchar *name;
+  const gchar *path;
+  const gchar *iface;
+  gboolean running;
+} DbusScreensaver;
+
+static DbusScreensaver dbus_screensavers[] =
+{
+  { "org.xfce.ScreenSaver", "/org/xfce/ScreenSaver", "org.xfce.ScreenSaver", 
FALSE },
+  { "org.cinnamon.ScreenSaver", "/org/cinnamon/ScreenSaver", 
"org.cinnamon.ScreenSaver", FALSE },
+  { "org.mate.ScreenSaver", "/org/mate/ScreenSaver", "org.mate.ScreenSaver", 
FALSE },
+  { "org.freedesktop.ScreenSaver", "/org/freedesktop/ScreenSaver", 
"org.freedesktop.ScreenSaver", FALSE },
 };
 
 
@@ -102,9 +113,10 @@
 {
   GObjectClass *object_class = G_OBJECT_CLASS (klass);
 
-  object_class->finalize = xfce_screensaver_finalize;
-  object_class->set_property = xfce_screensaver_set_property;
   object_class->get_property = xfce_screensaver_get_property;
+  object_class->set_property = xfce_screensaver_set_property;
+  object_class->constructed = xfce_screensaver_constructed;
+  object_class->finalize = xfce_screensaver_finalize;
 
 #define XFCE_PARAM_FLAGS (G_PARAM_READWRITE \
                           | G_PARAM_CONSTRUCT \
@@ -112,62 +124,88 @@
                           | G_PARAM_STATIC_NICK \
                           | G_PARAM_STATIC_BLURB)
 
-  /* heartbeat command - to inhibit the screensaver from activating,
-   * i.e. xscreensaver-command -deactivate */
   g_object_class_install_property (object_class, PROP_HEARTBEAT_COMMAND,
-                                   g_param_spec_string (HEARTBEAT_COMMAND,
-                                                        HEARTBEAT_COMMAND,
+                                   g_param_spec_string ("heartbeat-command",
+                                                        "heartbeat-command",
                                                         "Inhibit the 
screensaver from activating, "
-                                                        "i.e. 
xscreensaver-command -deactivate",
-                                                        "xscreensaver-command 
-deactivate",
+                                                        "e.g. 
xscreensaver-command --deactivate",
+                                                        NULL,
                                                         XFCE_PARAM_FLAGS));
 
-  /* lock command - to lock the desktop, i.e. xscreensaver-command -lock */
   g_object_class_install_property (object_class, PROP_LOCK_COMMAND,
-                                   g_param_spec_string (LOCK_COMMAND,
-                                                        LOCK_COMMAND,
-                                                        "Lock the desktop, 
i.e. "
-                                                        "xscreensaver-command 
-lock",
-                                                        "xscreensaver-command 
-lock",
+                                   g_param_spec_string ("lock-command",
+                                                        "lock-command",
+                                                        "Lock the desktop, 
e.g. "
+                                                        "xscreensaver-command 
--lock",
+                                                        NULL,
                                                         XFCE_PARAM_FLAGS));
+
+  g_object_class_install_property (object_class, PROP_LOCK_ON_SLEEP,
+                                   g_param_spec_boolean ("lock-on-sleep",
+                                                         "lock-on-sleep",
+                                                         "Whether to lock 
before suspend/hibernate",
+                                                         FALSE,
+                                                         XFCE_PARAM_FLAGS));
 #undef XFCE_PARAM_FLAGS
 }
 
 
 
-static gboolean
-xfce_screen_saver_proxy_setup (XfceScreensaver *saver,
-                               const gchar *name,
-                               const gchar *object_path,
-                               const gchar *interface)
-{
-  GDBusProxy *proxy = g_dbus_proxy_new_for_bus_sync (G_BUS_TYPE_SESSION,
-                                                     G_DBUS_PROXY_FLAGS_NONE,
-                                                     NULL,
-                                                     name,
-                                                     object_path,
-                                                     interface,
-                                                     NULL,
-                                                     NULL);
-  if (proxy != NULL)
-    {
-      /* is there anyone actually providing a service? */
-      gchar *owner = g_dbus_proxy_get_name_owner (proxy);
-      if (owner != NULL)
+static void
+name_owner_changed (GDBusProxy *proxy,
+                    GParamSpec *pspec,
+                    XfceScreensaver *saver)
+{
+  /* update current proxy status */
+  for (guint i = 0; i < SCREENSAVER_TYPE_OTHER; i++)
+    {
+      if (saver->proxies[i] == proxy)
         {
-          DBG ("proxy owner: %s", owner);
-          saver->proxy = proxy;
-          g_free (owner);
-          return TRUE;
+          gchar *owner = g_dbus_proxy_get_name_owner (proxy);
+          if (owner == NULL)
+            {
+              dbus_screensavers[i].running = FALSE;
+              if (saver->screensaver_type == i)
+                {
+                  saver->screensaver_type = SCREENSAVER_TYPE_OTHER;
+                  saver->cookie = 0;
+                  if (saver->screensaver_id != 0)
+                    {
+                      g_source_remove (saver->screensaver_id);
+                      saver->screensaver_id = 0;
+                    }
+                }
+            }
+          else
+            {
+              dbus_screensavers[i].running = TRUE;
+              g_free (owner);
+            }
+          break;
         }
-      else
+    }
+
+  /* update used screensaver */
+  for (guint i = 0; i < SCREENSAVER_TYPE_OTHER; i++)
+    {
+      if (dbus_screensavers[i].running && i != saver->screensaver_type)
         {
-          /* not using this proxy, nobody's home */
-          g_object_unref (proxy);
+          if (i < saver->screensaver_type)
+            {
+              gboolean inhibited = saver->cookie != 0 || saver->screensaver_id 
!= 0;
+              if (inhibited)
+                xfce_screensaver_inhibit (saver, FALSE);
+              saver->screensaver_type = i;
+              if (inhibited)
+                xfce_screensaver_inhibit (saver, TRUE);
+            }
+          else
+            {
+              g_warning ("%s running but unused: using %s instead",
+                         dbus_screensavers[i].name, 
dbus_screensavers[saver->screensaver_type].name);
+            }
         }
     }
-
-  return FALSE;
 }
 
 
@@ -177,63 +215,28 @@
 {
   GError *error = NULL;
 
-  if (! xfconf_init (&error))
-    {
-      g_critical ("xfconf_init failed: %s\n", error->message);
-      g_clear_error (&error);
-    }
-  else
-    {
-      saver->xfconf_initialized = TRUE;
-      saver->xfpm_channel = xfconf_channel_get (XFPM_CHANNEL);
-      saver->xfsm_channel = xfconf_channel_get (XFSM_CHANNEL);
-    }
-
-  if (xfce_screen_saver_proxy_setup (saver,
-                                     "org.xfce.ScreenSaver",
-                                     "/org/xfce/ScreenSaver",
-                                     "org.xfce.ScreenSaver"))
-    {
-      DBG ("using Xfce screensaver daemon");
-      saver->screensaver_type = SCREENSAVER_TYPE_XFCE;
-    }
-  /* Try to use the freedesktop dbus API */
-  else if (xfce_screen_saver_proxy_setup (saver,
-                                          "org.freedesktop.ScreenSaver",
-                                          "/org/freedesktop/ScreenSaver",
-                                          "org.freedesktop.ScreenSaver"))
-    {
-      DBG ("using freedesktop compliant screensaver daemon");
-      saver->screensaver_type = SCREENSAVER_TYPE_FREEDESKTOP;
-    }
-  else if (xfce_screen_saver_proxy_setup (saver,
-                                          "org.cinnamon.ScreenSaver",
-                                          "/org/cinnamon/ScreenSaver",
-                                          "org.cinnamon.ScreenSaver"))
-    {
-      DBG ("using cinnamon screensaver daemon");
-      saver->screensaver_type = SCREENSAVER_TYPE_CINNAMON;
-    }
-  else if (xfce_screen_saver_proxy_setup (saver,
-                                          "org.mate.ScreenSaver",
-                                          "/org/mate/ScreenSaver",
-                                          "org.mate.ScreenSaver"))
-    {
-      DBG ("using mate screensaver daemon");
-      saver->screensaver_type = SCREENSAVER_TYPE_MATE;
-    }
-  else if (xfce_screen_saver_proxy_setup (saver,
-                                          "org.gnome.ScreenSaver",
-                                          "/org/gnome/ScreenSaver",
-                                          "org.gnome.ScreenSaver"))
-    {
-      DBG ("using gnome screensaver daemon");
-      saver->screensaver_type = SCREENSAVER_TYPE_GNOME;
-    }
-  else
+  saver->screensaver_type = SCREENSAVER_TYPE_OTHER;
+
+  for (guint i = 0; i < SCREENSAVER_TYPE_OTHER; i++)
     {
-      DBG ("using command line screensaver interface");
-      saver->screensaver_type = SCREENSAVER_TYPE_OTHER;
+      saver->proxies[i] = g_dbus_proxy_new_for_bus_sync (G_BUS_TYPE_SESSION,
+                                                         
G_DBUS_PROXY_FLAGS_DO_NOT_AUTO_START_AT_CONSTRUCTION,
+                                                         NULL,
+                                                         
dbus_screensavers[i].name,
+                                                         
dbus_screensavers[i].path,
+                                                         
dbus_screensavers[i].iface,
+                                                         NULL,
+                                                         &error);
+      if (error != NULL)
+        {
+          g_warning ("Failed to get a proxy for %s: %s", 
dbus_screensavers[i].name, error->message);
+          g_clear_error (&error);
+        }
+      else
+        {
+          name_owner_changed (saver->proxies[i], NULL, saver);
+          g_signal_connect (saver->proxies[i], "notify::g-name-owner", 
G_CALLBACK (name_owner_changed), saver);
+        }
     }
 }
 
@@ -257,6 +260,10 @@
       g_value_set_string (value, saver->lock_command);
       break;
 
+    case PROP_LOCK_ON_SLEEP:
+      g_value_set_boolean (value, saver->lock_on_sleep);
+      break;
+
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
       break;
@@ -272,21 +279,32 @@
                                GParamSpec *pspec)
 {
   XfceScreensaver *saver = XFCE_SCREENSAVER (object);
+  const gchar *str_value;
 
   switch (property_id)
     {
     case PROP_HEARTBEAT_COMMAND:
       g_free (saver->heartbeat_command);
-      saver->heartbeat_command = g_value_dup_string (value);
+      saver->heartbeat_command = NULL;
+      str_value = g_value_get_string (value);
+      if (!xfce_str_is_empty (str_value))
+        saver->heartbeat_command = g_strdup (str_value);
       DBG ("saver->heartbeat_command %s", saver->heartbeat_command);
       break;
 
     case PROP_LOCK_COMMAND:
       g_free (saver->lock_command);
-      saver->lock_command = g_value_dup_string (value);
+      saver->lock_command = NULL;
+      str_value = g_value_get_string (value);
+      if (!xfce_str_is_empty (str_value))
+        saver->lock_command = g_strdup (str_value);
       DBG ("saver->lock_command %s", saver->lock_command);
       break;
 
+    case PROP_LOCK_ON_SLEEP:
+      saver->lock_on_sleep = g_value_get_boolean (value);
+      break;
+
     default:
       G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec);
       break;
@@ -296,6 +314,57 @@
 
 
 static void
+xfce_screensaver_constructed (GObject *object)
+{
+  XfceScreensaver *saver = XFCE_SCREENSAVER (object);
+  GError *error = NULL;
+
+  saver->xfconf_initialized = xfconf_init (&error);
+  if (!saver->xfconf_initialized)
+    {
+      g_critical ("Xfconf initialization failed: %s", error->message);
+      g_clear_error (&error);
+    }
+  else
+    {
+      XfconfChannel *power_channel = xfconf_channel_get 
("xfce4-power-manager");
+      XfconfChannel *session_channel = xfconf_channel_get ("xfce4-session");
+      XfconfChannel *saver_channel = xfconf_channel_get ("xfce4-screensaver");
+      xfconf_g_property_bind (power_channel,
+                              "/xfce4-power-manager/heartbeat-command",
+                              G_TYPE_STRING,
+                              G_OBJECT (saver),
+                              "heartbeat-command");
+      xfconf_g_property_bind (session_channel,
+                              "/general/LockCommand",
+                              G_TYPE_STRING,
+                              G_OBJECT (saver),
+                              "lock-command");
+
+      /* keep components having a "lock-on-sleep" setting in sync */
+      xfconf_g_property_bind (power_channel,
+                              
"/xfce4-power-manager/lock-screen-suspend-hibernate",
+                              G_TYPE_BOOLEAN,
+                              G_OBJECT (saver),
+                              "lock-on-sleep");
+      xfconf_g_property_bind (session_channel,
+                              "/shutdown/LockScreen",
+                              G_TYPE_BOOLEAN,
+                              G_OBJECT (saver),
+                              "lock-on-sleep");
+      xfconf_g_property_bind (saver_channel,
+                              "/lock/sleep-activation",
+                              G_TYPE_BOOLEAN,
+                              G_OBJECT (saver),
+                              "lock-on-sleep");
+    }
+
+  G_OBJECT_CLASS (xfce_screensaver_parent_class)->constructed (object);
+}
+
+
+
+static void
 xfce_screensaver_finalize (GObject *object)
 {
   XfceScreensaver *saver = XFCE_SCREENSAVER (object);
@@ -306,11 +375,8 @@
       saver->screensaver_id = 0;
     }
 
-  if (saver->proxy)
-    {
-      g_object_unref (saver->proxy);
-      saver->proxy = NULL;
-    }
+  for (guint i = 0; i < SCREENSAVER_TYPE_OTHER; i++)
+    g_clear_object (&saver->proxies[i]);
 
   if (saver->heartbeat_command)
     {
@@ -320,12 +386,14 @@
 
   if (saver->lock_command)
     {
-      g_free (saver->heartbeat_command);
-      saver->heartbeat_command = NULL;
+      g_free (saver->lock_command);
+      saver->lock_command = NULL;
     }
 
   if (saver->xfconf_initialized)
     xfconf_shutdown ();
+
+  G_OBJECT_CLASS (xfce_screensaver_parent_class)->finalize (object);
 }
 
 
@@ -333,7 +401,7 @@
 /**
  * xfce_screensaver_new:
  *
- * Creates a new #XfceScreensaver object or increases the refrence count
+ * Creates a new #XfceScreensaver object or increases the reference count
  * of the current object.
  *
  * Returns: (transfer full): An #XfceScreensaver object, to be released with
@@ -354,20 +422,6 @@
     {
       saver = g_object_new (XFCE_TYPE_SCREENSAVER, NULL);
       g_object_add_weak_pointer (G_OBJECT (saver), (gpointer *) &saver);
-
-      if (XFCE_SCREENSAVER (saver)->xfconf_initialized)
-        {
-          xfconf_g_property_bind (XFCE_SCREENSAVER (saver)->xfpm_channel,
-                                  XFPM_PROPERTIES_PREFIX HEARTBEAT_COMMAND,
-                                  G_TYPE_STRING,
-                                  G_OBJECT (saver),
-                                  HEARTBEAT_COMMAND);
-          xfconf_g_property_bind (XFCE_SCREENSAVER (saver)->xfsm_channel,
-                                  XFSM_PROPERTIES_PREFIX "LockCommand",
-                                  G_TYPE_STRING,
-                                  G_OBJECT (saver),
-                                  LOCK_COMMAND);
-        }
     }
 
   return XFCE_SCREENSAVER (saver);
@@ -383,13 +437,13 @@
   TRACE ("entering\n");
 
   /* If we found an interface during the setup, use it */
-  if (saver->proxy)
+  if (saver->screensaver_type != SCREENSAVER_TYPE_OTHER)
     {
-      GVariant *response = g_dbus_proxy_call_sync (saver->proxy,
+      GVariant *response = g_dbus_proxy_call_sync 
(saver->proxies[saver->screensaver_type],
                                                    "SimulateUserActivity",
                                                    NULL,
                                                    G_DBUS_CALL_FLAGS_NONE,
-                                                   -1,
+                                                   NO_REPLY_TIMEOUT,
                                                    NULL,
                                                    NULL);
       if (response != NULL)
@@ -410,7 +464,7 @@
 /**
  * xfce_screensaver_inhibit:
  * @saver: the #XfceScreensaver object
- * @inhibit: wether to inhibit the screensaver from activating.
+ * @inhibit: whether to inhibit the screensaver from activating
  *
  * Calling this function with @inhibit as %TRUE will prevent the user's
  * screensaver from activating. This is useful when the user is watching
@@ -425,19 +479,16 @@
 xfce_screensaver_inhibit (XfceScreensaver *saver,
                           gboolean inhibit)
 {
-  /* SCREENSAVER_TYPE_FREEDESKTOP, SCREENSAVER_TYPE_MATE,
-   * SCREENSAVER_TYPE_GNOME and SCREENSAVER_TYPE_XFCE
-   * don't need a periodic timer because they have an actual
-   * inhibit/uninhibit setup */
+  /* SCREENSAVER_TYPE_FREEDESKTOP, SCREENSAVER_TYPE_MATE and 
SCREENSAVER_TYPE_XFCE
+   * don't need a periodic timer because they have an actual inhibit/uninhibit 
setup */
   switch (saver->screensaver_type)
     {
-    case SCREENSAVER_TYPE_FREEDESKTOP:
-    case SCREENSAVER_TYPE_MATE:
-    case SCREENSAVER_TYPE_GNOME:
     case SCREENSAVER_TYPE_XFCE:
+    case SCREENSAVER_TYPE_MATE:
+    case SCREENSAVER_TYPE_FREEDESKTOP:
       if (inhibit)
         {
-          GVariant *response = g_dbus_proxy_call_sync (saver->proxy,
+          GVariant *response = g_dbus_proxy_call_sync 
(saver->proxies[saver->screensaver_type],
                                                        "Inhibit",
                                                        g_variant_new ("(ss)",
                                                                       
PACKAGE_NAME,
@@ -453,7 +504,7 @@
         }
       else
       {
-        GVariant *response = g_dbus_proxy_call_sync (saver->proxy,
+        GVariant *response = g_dbus_proxy_call_sync 
(saver->proxies[saver->screensaver_type],
                                                      "UnInhibit",
                                                      g_variant_new ("(u)",
                                                                     
saver->cookie),
@@ -466,8 +517,8 @@
       }
       break;
 
-    case SCREENSAVER_TYPE_OTHER:
     case SCREENSAVER_TYPE_CINNAMON:
+    case SCREENSAVER_TYPE_OTHER:
       /* remove any existing keepalive */
       if (saver->screensaver_id != 0)
         {
@@ -486,7 +537,7 @@
       break;
 
     default:
-      g_warning ("Not able to inhibit or uninhibit screensaver");
+      g_warn_if_reached ();
       break;
     }
 }
@@ -509,67 +560,119 @@
 xfce_screensaver_lock (XfceScreensaver *saver)
 {
   GVariant *response;
-  gboolean ret = FALSE;
+  GError *error = NULL;
+  gint status;
 
-  switch (saver->screensaver_type)
+  /* prioritize user command and don't try anything else it that fails */
+  if (saver->lock_command != NULL)
     {
-    case SCREENSAVER_TYPE_FREEDESKTOP:
-    case SCREENSAVER_TYPE_MATE:
-    case SCREENSAVER_TYPE_GNOME:
-    case SCREENSAVER_TYPE_XFCE:
-      response = g_dbus_proxy_call_sync (saver->proxy,
-                                         "Lock",
-                                         g_variant_new ("()"),
-                                         G_DBUS_CALL_FLAGS_NONE,
-                                         -1,
-                                         NULL,
-                                         NULL);
-      if (response != NULL)
+      gchar **argv;
+
+      DBG ("running lock command: %s", saver->lock_command);
+
+      /* prevent accidental recursive calling of lock command if it calls
+       * xfce_screensaver_lock() in any way (as e.g. xflock4 does) */
+      if (g_getenv ("XFCE_SCREENSAVER_LOCK") != NULL)
         {
-          g_variant_unref (response);
-          return TRUE;
+          g_warning ("Recursive call of %s", saver->lock_command);
+          return FALSE;
         }
-      break;
 
-    case SCREENSAVER_TYPE_CINNAMON:
-      response = g_dbus_proxy_call_sync (saver->proxy,
-                                         "Lock",
-                                         g_variant_new ("(s)", PACKAGE_NAME),
-                                         G_DBUS_CALL_FLAGS_NONE,
-                                         -1,
-                                         NULL,
-                                         NULL);
-      if (response != NULL)
+      if (g_shell_parse_argv (saver->lock_command, NULL, &argv, NULL))
         {
-          g_variant_unref (response);
-          return TRUE;
+          gchar **env = g_environ_setenv (g_get_environ (), 
"XFCE_SCREENSAVER_LOCK", "", TRUE);
+          gboolean ret = g_spawn_sync (NULL, argv, env, G_SPAWN_SEARCH_PATH, 
NULL, NULL, NULL, NULL, &status, NULL)
+                         && g_spawn_check_exit_status (status, NULL);
+          g_strfreev (env);
+          g_strfreev (argv);
+          return ret;
         }
-      break;
-
-    case SCREENSAVER_TYPE_OTHER:
-      /* Will be handled after the switch statement. */
-      break;
 
-    default:
-      g_warning ("Unknown screensaver type set when calling 
xfce_screensaver_lock");
-      break;
+      return FALSE;
     }
 
-  /* Fallback: either no dbus interface set up or it didn't Lock(). */
-  if (saver->lock_command != NULL)
+  /* try dbus screensavers */
+  for (guint i = 0; i < SCREENSAVER_TYPE_OTHER; i++)
     {
-      DBG ("running lock command: %s", saver->lock_command);
-      ret = g_spawn_command_line_async (saver->lock_command, NULL);
-    }
-
-  if (!ret)
-    ret = g_spawn_command_line_async ("xflock4", NULL);
+      if ((saver->screensaver_type == SCREENSAVER_TYPE_OTHER && 
saver->proxies[i] != NULL)
+          || saver->screensaver_type == i)
+        {
+          switch (i)
+            {
+            case SCREENSAVER_TYPE_XFCE:
+              response = g_dbus_proxy_call_sync (saver->proxies[i],
+                                                 "Lock",
+                                                 NULL,
+                                                 G_DBUS_CALL_FLAGS_NONE,
+                                                 -1,
+                                                 NULL,
+                                                 &error);
+              break;
+
+            case SCREENSAVER_TYPE_CINNAMON:
+              response = g_dbus_proxy_call_sync (saver->proxies[i],
+                                                 "Lock",
+                                                 g_variant_new ("(s)", 
PACKAGE_NAME),
+                                                 G_DBUS_CALL_FLAGS_NONE,
+                                                 -1,
+                                                 NULL,
+                                                 &error);
+              break;
+
+            case SCREENSAVER_TYPE_MATE:
+            case SCREENSAVER_TYPE_FREEDESKTOP:
+              response = g_dbus_proxy_call_sync (saver->proxies[i],
+                                                 "Lock",
+                                                 NULL,
+                                                 G_DBUS_CALL_FLAGS_NONE,
+                                                 NO_REPLY_TIMEOUT,
+                                                 NULL,
+                                                 &error);
+
+              /* mate-screensaver does not send a reply in case of success, 
and for screensavers
+               * using org.freedesktop.ScreenSaver we're not sure, so if no 
other error is received
+               * after a reasonnable timeout, consider it a success */
+              if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_TIMED_OUT))
+                {
+                  response = g_variant_ref_sink (g_variant_new ("()"));
+                  g_clear_error (&error);
+                }
+              break;
+
+            default:
+              g_warn_if_reached ();
+              continue;
+            }
 
-  if (!ret)
-    ret = g_spawn_command_line_async ("xdg-screensaver lock", NULL);
+          if (response != NULL)
+            {
+              g_variant_unref (response);
+              return TRUE;
+            }
+          else
+            {
+              /* if it's running and can lock it should succeed, don't try 
anything else */
+              gboolean running = !g_error_matches (error, G_DBUS_ERROR, 
G_DBUS_ERROR_NAME_HAS_NO_OWNER);
+              gboolean can_lock = !g_error_matches (error, G_DBUS_ERROR, 
G_DBUS_ERROR_UNKNOWN_METHOD);
+              g_clear_error (&error);
+              if (running && can_lock)
+                return FALSE;
+            }
+        }
+    }
 
-  if (!ret)
-    ret = g_spawn_command_line_async ("xscreensaver-command -lock", NULL);
+  /* no user command or dbus interface set up */
+  if (g_spawn_command_line_sync ("xdg-screensaver lock", NULL, NULL, &status, 
NULL)
+      && g_spawn_check_exit_status (status, NULL))
+    return TRUE;
+
+  if (g_spawn_command_line_sync ("xscreensaver-command --lock", NULL, NULL, 
&status, NULL)
+      && g_spawn_check_exit_status (status, NULL))
+    return TRUE;
+
+  if (g_spawn_command_line_sync ("light-locker-command --lock", NULL, NULL, 
&status, NULL)
+      && g_spawn_check_exit_status (status, NULL))
+    return TRUE;
 
-  return ret;
+  return FALSE;
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude 
config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 
--exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh 
old/libxfce4ui-4.18.3/libxfce4ui/xfce-screensaver.h 
new/libxfce4ui-4.18.4/libxfce4ui/xfce-screensaver.h
--- old/libxfce4ui-4.18.3/libxfce4ui/xfce-screensaver.h 2023-03-08 
18:18:19.000000000 +0100
+++ new/libxfce4ui-4.18.4/libxfce4ui/xfce-screensaver.h 2023-05-17 
20:57:23.000000000 +0200
@@ -18,6 +18,10 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  
USA
  */
 
+#if !defined (_LIBXFCE4UI_INSIDE_LIBXFCE4UI_H) && !defined 
(LIBXFCE4UI_COMPILATION)
+#error "Only <libxfce4ui/libxfce4ui.h> can be included directly, this file is 
not part of the public API."
+#endif
+
 /* do not change this in __XFCE_SCREENSAVER_H__ or so: it allows xfce4-session 
and
  * xfce4-power-manager <= 4.18.0 to build with libxfce4ui >= 4.18.2 by avoiding
  * conflicting types */

Reply via email to