From 0337e60f52a78c118ae96148f518928182d69105 Mon Sep 17 00:00:00 2001 From: Michael Weiser Date: Thu, 9 Jan 2020 12:18:37 +0100 Subject: [PATCH 1/2] dbus: Prevent overzealous activiation Port over a check from mate screensaver that prevents activation when clearing an inhibitor by first checking if the session is actually idle. If clearing the inhibitor is the result of some interactive user action, this should never be the case and thus prevent e.g. saver activation when stopping video playback that did inhibit the screen saver. --- src/gs-listener-dbus.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/gs-listener-dbus.c b/src/gs-listener-dbus.c index c501015..0c15379 100644 --- a/src/gs-listener-dbus.c +++ b/src/gs-listener-dbus.c @@ -311,6 +311,10 @@ listener_check_activation (GSListener *listener) { return TRUE; } + if (!listener->priv->session_idle) { + return TRUE; + } + /* if we aren't inhibited then activate */ inhibited = listener_ref_entry_is_present (listener, REF_ENTRY_TYPE_INHIBIT); -- 2.24.1