From 283504d5274ca3007bc20029b6104016eead7a89 Mon Sep 17 00:00:00 2001 From: Yuxuan Shui Date: Mon, 31 Aug 2020 18:32:14 +0100 Subject: [PATCH] Remove no-dock-shadow and no-dnd-shadow Deprecated since v4 Signed-off-by: Yuxuan Shui --- man/picom.1.asciidoc | 6 ------ src/config_libconfig.c | 14 ++++++-------- src/options.c | 14 +++++++------- 3 files changed, 13 insertions(+), 21 deletions(-) diff --git a/man/picom.1.asciidoc b/man/picom.1.asciidoc index 232bd5bd..fb263f88 100644 --- a/man/picom.1.asciidoc +++ b/man/picom.1.asciidoc @@ -49,9 +49,6 @@ OPTIONS *-c*, *--shadow*:: Enabled client-side shadows on windows. Note desktop windows (windows with '_NET_WM_WINDOW_TYPE_DESKTOP') never get shadow, unless explicitly requested using the wintypes option. -*-C*, *--no-dock-shadow*:: - Avoid drawing shadows on dock/panel windows. This option is deprecated, you should use the *wintypes* option in your config file instead. - *-f*, *--fading*:: Fade windows in/out when opening/closing and when opacity changes, unless *--no-fading-openclose* is used. @@ -64,9 +61,6 @@ OPTIONS *-e*, *--frame-opacity*='OPACITY':: Opacity of window titlebars and borders. (0.1 - 1.0, disabled by default) -*-G*, *--no-dnd-shadow*:: - Don't draw shadows on drag-and-drop windows. This option is deprecated, you should use the *wintypes* option in your config file instead. - *-b*, *--daemon*:: Daemonize process. Fork to background after initialization. Causes issues with certain (badly-written) drivers. diff --git a/src/config_libconfig.c b/src/config_libconfig.c index 9de04790..57a32f21 100644 --- a/src/config_libconfig.c +++ b/src/config_libconfig.c @@ -374,17 +374,15 @@ char *parse_config_libconfig(options_t *opt, const char *config_file, bool *shad *shadow_enable = ival; // -C (no_dock_shadow) if (config_lookup_bool(&cfg, "no-dock-shadow", &ival)) { - log_warn("Option `no-dock-shadow` is deprecated, and will be removed." - " Please use the wintype option `shadow` of `dock` instead."); - opt->wintype_option[WINTYPE_DOCK].shadow = false; - winopt_mask[WINTYPE_DOCK].shadow = true; + log_error("Option `no-dock-shadow` has been removed. Please use the " + "wintype option `shadow` of `dock` instead."); + goto err; } // -G (no_dnd_shadow) if (config_lookup_bool(&cfg, "no-dnd-shadow", &ival)) { - log_warn("Option `no-dnd-shadow` is deprecated, and will be removed." - " Please use the wintype option `shadow` of `dnd` instead."); - opt->wintype_option[WINTYPE_DND].shadow = false; - winopt_mask[WINTYPE_DND].shadow = true; + log_error("Option `no-dnd-shadow` has been removed. Please use the " + "wintype option `shadow` of `dnd` instead."); + goto err; }; // -m (menu_opacity) if (config_lookup_float(&cfg, "menu-opacity", &dval)) { diff --git a/src/options.c b/src/options.c index 953d4644..7bd6865f 100644 --- a/src/options.c +++ b/src/options.c @@ -565,13 +565,13 @@ bool get_cfg(options_t *opt, int argc, char *const *argv, bool shadow_enable, case 'O': opt->fade_out_step = normalize_d(atof(optarg)); break; case 'c': shadow_enable = true; break; case 'C': - winopt_mask[WINTYPE_DOCK].shadow = true; - opt->wintype_option[WINTYPE_DOCK].shadow = false; - break; + log_error("Option `--no-dock-shadow`/`-C` has been removed. Please" + " use the wintype option `shadow` of `dock` instead."); + return false; case 'G': - winopt_mask[WINTYPE_DND].shadow = true; - opt->wintype_option[WINTYPE_DND].shadow = false; - break; + log_error("Option `--no-dnd-shadow`/`-G` has been removed. Please " + "use the wintype option `shadow` of `dnd` instead."); + return false; case 'm':; double tmp; tmp = normalize_d(atof(optarg)); @@ -604,7 +604,7 @@ bool get_cfg(options_t *opt, int argc, char *const *argv, bool shadow_enable, case 'a': case 's': log_error("-n, -a, and -s have been removed."); - break; + return false; // Long options case 256: // --config