From f2e0bb3c45d1f43b46e2e11bb09cbb0d67ad765f Mon Sep 17 00:00:00 2001 From: Pavel Grunt Date: Tue, 17 Jan 2017 15:45:48 +0100 Subject: [PATCH] console-kit: Check session-lock just by IdleHint gnome-panel in RHEL6 does not emit the Unlock signal when session is being unlocked making the agent think that the session is locked. Remove handling of Lock/Unlock signals and keep only IdleHintChanged. Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1412673 Acked-by: Victor Toso --- src/vdagentd/console-kit.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/vdagentd/console-kit.c b/src/vdagentd/console-kit.c index 024a260..a939f38 100644 --- a/src/vdagentd/console-kit.c +++ b/src/vdagentd/console-kit.c @@ -493,11 +493,11 @@ gboolean session_info_session_is_locked(struct session_info *info) /* Not every system does emit Lock and Unlock signals (for instance, such * is the case for RHEL6) but most of the systems seems to emit the - * IdleHintChanged. So, we give priority to the Lock signal, if it is Locked - * we return that the session is locked, otherwise we double check with the - * IdleHint value */ + * IdleHintChanged. So use the IdleHint value. + * systemd-login uses locked-hint which is not implemented in ConsoleKit, + * see https://github.com/ConsoleKit2/ConsoleKit2/issues/89 */ si_dbus_read_signals(info); - locked = (info->session_is_locked || info->session_idle_hint); + locked = info->session_idle_hint; if (info->verbose) { syslog(LOG_DEBUG, "(console-kit) session is locked: %s", locked ? "yes" : "no"); -- 2.11.4.GIT