From 44a771cf76c77dee45b14d218eb754dc83cf0cb8 Mon Sep 17 00:00:00 2001 From: Yuxuan Shui Date: Sun, 10 Nov 2019 05:04:10 +0000 Subject: [PATCH] core: move some config validation into options.c Signed-off-by: Yuxuan Shui --- src/options.c | 5 +++++ src/picom.c | 5 ----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/options.c b/src/options.c index d3fcc0e..1541c63 100644 --- a/src/options.c +++ b/src/options.c @@ -830,6 +830,11 @@ bool get_cfg(options_t *opt, int argc, char *const *argv, bool shadow_enable, return false; } + if (opt->debug_mode && !opt->experimental_backends) { + log_error("Debug mode only works with the experimental backends."); + return false; + } + // Range checking and option assignments opt->fade_delta = max2(opt->fade_delta, 1); opt->shadow_radius = max2(opt->shadow_radius, 0); diff --git a/src/picom.c b/src/picom.c index c3f41f4..f48538a 100644 --- a/src/picom.c +++ b/src/picom.c @@ -1773,11 +1773,6 @@ static session_t *session_init(int argc, char **argv, Display *dpy, "binary will not be installed in the future."); } - if (ps->o.debug_mode && !ps->o.experimental_backends) { - log_fatal("Debug mode only works with the experimental backends."); - return NULL; - } - ps->atoms = init_atoms(ps->c); ps->atoms_wintypes[WINTYPE_UNKNOWN] = 0; #define SET_WM_TYPE_ATOM(x) \