context/main: Guard logind code behind #ifdef HAVE_LOGIND
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/4223>
This commit is contained in:
parent
e7ca9cecea
commit
5152fa142b
@ -349,8 +349,10 @@ meta_context_main_get_x11_display_policy (MetaContext *context)
|
|||||||
#ifdef HAVE_WAYLAND
|
#ifdef HAVE_WAYLAND
|
||||||
if (context_main->options.no_x11)
|
if (context_main->options.no_x11)
|
||||||
return META_X11_DISPLAY_POLICY_DISABLED;
|
return META_X11_DISPLAY_POLICY_DISABLED;
|
||||||
|
#ifdef HAVE_LOGIND
|
||||||
else if (sd_pid_get_user_unit (0, &unit) < 0)
|
else if (sd_pid_get_user_unit (0, &unit) < 0)
|
||||||
return META_X11_DISPLAY_POLICY_MANDATORY;
|
return META_X11_DISPLAY_POLICY_MANDATORY;
|
||||||
|
#endif
|
||||||
else
|
else
|
||||||
return META_X11_DISPLAY_POLICY_ON_DEMAND;
|
return META_X11_DISPLAY_POLICY_ON_DEMAND;
|
||||||
#else /* HAVE_WAYLAND */
|
#else /* HAVE_WAYLAND */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user