From 5152fa142b58c009e2a4587eece9fd20cbca0a90 Mon Sep 17 00:00:00 2001 From: Sebastian Wick Date: Mon, 20 Jan 2025 16:35:50 +0100 Subject: [PATCH] context/main: Guard logind code behind #ifdef HAVE_LOGIND Part-of: --- src/core/meta-context-main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/core/meta-context-main.c b/src/core/meta-context-main.c index 0086ffe7c..1442a8319 100644 --- a/src/core/meta-context-main.c +++ b/src/core/meta-context-main.c @@ -349,8 +349,10 @@ meta_context_main_get_x11_display_policy (MetaContext *context) #ifdef HAVE_WAYLAND if (context_main->options.no_x11) return META_X11_DISPLAY_POLICY_DISABLED; +#ifdef HAVE_LOGIND else if (sd_pid_get_user_unit (0, &unit) < 0) return META_X11_DISPLAY_POLICY_MANDATORY; +#endif else return META_X11_DISPLAY_POLICY_ON_DEMAND; #else /* HAVE_WAYLAND */