[Xfce4-commits] [apps/xfce4-screensaver] 01/01: Respect xfce4-power-manager lock-screen-suspend-hibernate property
noreply at xfce.org
noreply at xfce.org
Fri Mar 15 01:58:14 CET 2019
This is an automated email from the git hooks/post-receive script.
b l u e s a b r e p u s h e d a c o m m i t t o b r a n c h m a s t e r
in repository apps/xfce4-screensaver.
commit f103889937f5bc27e535f5cf5cccd08f035ce322
Author: Sean Davis <smd.seandavis at gmail.com>
Date: Thu Mar 14 20:58:07 2019 -0400
Respect xfce4-power-manager lock-screen-suspend-hibernate property
---
src/gs-listener-dbus.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/src/gs-listener-dbus.c b/src/gs-listener-dbus.c
index 6f5d1aa..0ea39fc 100644
--- a/src/gs-listener-dbus.c
+++ b/src/gs-listener-dbus.c
@@ -34,6 +34,7 @@
#include <dbus/dbus-glib-lowlevel.h>
#include <libxfce4util/libxfce4util.h>
+#include <xfconf/xfconf.h>
#ifdef WITH_SYSTEMD
#include <systemd/sd-login.h>
@@ -1491,8 +1492,15 @@ listener_dbus_handle_system_message (DBusConnection *connection,
dbus_error_init (&error);
dbus_message_get_args (message, &error, DBUS_TYPE_BOOLEAN, &active, DBUS_TYPE_INVALID);
if (active) {
- gs_debug ("Logind requested session lock");
- g_signal_emit (listener, signals[LOCK], 0);
+ XfconfChannel *channel = xfconf_channel_get ("xfce4-power-manager");
+ const gchar *property = "/xfce4-power-manager/lock-screen-suspend-hibernate";
+ gboolean lock_screen = xfconf_channel_get_bool (channel, property, TRUE);
+ if (lock_screen) {
+ gs_debug ("Logind requested session lock");
+ g_signal_emit (listener, signals[LOCK], 0);
+ } else {
+ gs_debug ("Logind requested session lock, but lock on suspend is disabled");
+ }
} else {
gs_debug ("Logind requested session unlock");
// FIXME: there is no signal to request password prompt
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list