]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/login/logind-user.c
logind: rework logic to decide whether lock + idle + display applies to a session
authorLennart Poettering <lennart@poettering.net>
Wed, 29 Nov 2023 10:18:01 +0000 (11:18 +0100)
committerLennart Poettering <lennart@poettering.net>
Thu, 11 Jan 2024 16:23:47 +0000 (17:23 +0100)
commitb4f01bc1df625842c2db423b460a755c5817c1f9
tree44681c17f5461c7327a52b2705654d2e23a222e9
parentb5100c736f1fce2b6b22c07cf2725e4ec3764a75
logind: rework logic to decide whether lock + idle + display applies to a session

Let's streamline the logic that decides whether the screen lock, idle
timeout or display election mechanism applies to a session class. Let's
add explicitly SESSION_CLASS_IS_XYZ() macros for each, and then resue
them at all suitable places, and refuse any attempts to use the
functionality on the wrong clases with a friendly error message.
src/login/logind-core.c
src/login/logind-session-dbus.c
src/login/logind-session.c
src/login/logind-session.h
src/login/logind-user.c