Skip to content

Commit

Permalink
core: move some config validation into options.c
Browse files Browse the repository at this point in the history
Signed-off-by: Yuxuan Shui <[email protected]>
  • Loading branch information
yshui committed Nov 10, 2019
1 parent 2848b24 commit 44a771c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
5 changes: 5 additions & 0 deletions src/options.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
5 changes: 0 additions & 5 deletions src/picom.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) \
Expand Down

0 comments on commit 44a771c

Please sign in to comment.