[gnome-flashback] screensaver: lock screen if systemd LockedHint is true
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-flashback] screensaver: lock screen if systemd LockedHint is true
- Date: Wed, 12 Feb 2020 17:45:04 +0000 (UTC)
commit b8992fc9fe10730fa514cea72f916a75f97c1051
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Wed Feb 12 19:34:49 2020 +0200
screensaver: lock screen if systemd LockedHint is true
Re-lock screen on startup if systemd LockedHint is set to true. This
might happen if gnome-flashback crashed while lock screen was active.
dbus/org.freedesktop.login1.Session.xml | 2 ++
gnome-flashback/libscreensaver/gf-listener.c | 6 ++++++
2 files changed, 8 insertions(+)
---
diff --git a/dbus/org.freedesktop.login1.Session.xml b/dbus/org.freedesktop.login1.Session.xml
index 028dada..d3d07bb 100644
--- a/dbus/org.freedesktop.login1.Session.xml
+++ b/dbus/org.freedesktop.login1.Session.xml
@@ -7,6 +7,8 @@
<property name="Active" type="b" access="read" />
+ <property name="LockedHint" type="b" access="read" />
+
<method name="SetLockedHint">
<arg direction="in" type="b" />
</method>
diff --git a/gnome-flashback/libscreensaver/gf-listener.c b/gnome-flashback/libscreensaver/gf-listener.c
index df5698b..63641bc 100644
--- a/gnome-flashback/libscreensaver/gf-listener.c
+++ b/gnome-flashback/libscreensaver/gf-listener.c
@@ -363,6 +363,12 @@ login_session_ready_cb (GObject *object,
g_signal_connect (self->login_session, "notify::active",
G_CALLBACK (notify_active_cb), self);
+
+ if (gf_login_session_gen_get_locked_hint (self->login_session))
+ {
+ g_debug ("systemd LockedHint=True");
+ g_signal_emit (self, listener_signals[LOCK], 0);
+ }
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]