From 5ee08c43f20e7a4392df8a2b95ddb425c1dfa5cb Mon Sep 17 00:00:00 2001 From: Yuxuan Shui Date: Sun, 13 Oct 2024 17:37:01 +0100 Subject: [PATCH] config: deprecate resize-damage It only works with the legacy backends, which were removed. Signed-off-by: Yuxuan Shui --- man/picom.1.adoc | 3 --- src/config_libconfig.c | 5 ++++- src/options.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/man/picom.1.adoc b/man/picom.1.adoc index ee393c2dc1..986b77bfab 100644 --- a/man/picom.1.adoc +++ b/man/picom.1.adoc @@ -211,9 +211,6 @@ May also be one of the predefined kernels: `3x3box` (default), `5x5box`, `7x7box [[blur-background-exclude]]*--blur-background-exclude* _CONDITION_:: Exclude conditions for background blur. -*--resize-damage* _INTEGER_:: - Resize damaged region by a specific number of pixels. A positive value enlarges it while a negative one shrinks it. If the value is positive, those additional pixels will not be actually painted to screen, only used in blur calculation, and such. (Due to technical limitations, with *--use-damage*, those pixels will still be incorrectly painted to screen.) Primarily used to fix the line corruption issues of blur, in which case you should use the blur radius value here (e.g. with a 3x3 kernel, you should use `--resize-damage 1`, with a 5x5 one you use `--resize-damage 2`, and so on). May or may not work with *--glx-no-stencil*. Only works with *--legacy-backends*. Shrinking doesn't function correctly. - [[invert-color-include]]*--invert-color-include* _CONDITION_:: Specify a list of conditions of windows that should be painted with inverted color. Resource-hogging, and is not well tested. Using this is discouraged, see the xref:_window_rules[*WINDOW RULES*] section for the recommended way to do this. diff --git a/src/config_libconfig.c b/src/config_libconfig.c index d55829a866..21fa97ecbb 100644 --- a/src/config_libconfig.c +++ b/src/config_libconfig.c @@ -1049,7 +1049,10 @@ bool parse_config_libconfig(options_t *opt, const char *config_file) { } } // --resize-damage - config_lookup_int(&cfg, "resize-damage", &opt->resize_damage); + if (config_lookup_int(&cfg, "resize-damage", &opt->resize_damage)) { + log_warn("resize-damage is deprecated. Please remove it from your " + "configuration file."); + } // --glx-no-stencil lcfg_lookup_bool(&cfg, "glx-no-stencil", &opt->glx_no_stencil); // --glx-no-rebind-pixmap diff --git a/src/options.c b/src/options.c index b081f54521..6b8c6c84ad 100644 --- a/src/options.c +++ b/src/options.c @@ -468,7 +468,7 @@ static const struct picom_option picom_options[] = { [283] = {"blur-background" , FIXED(blur_method, BLUR_METHOD_KERNEL) , "Blur background of semi-transparent / ARGB windows. May impact performance"}, [290] = {"backend" , DO(store_backend) , "Backend. Possible values are: " BACKENDS}, [293] = {"benchmark" , INTEGER(benchmark, 0, INT_MAX) , "Benchmark mode. Repeatedly paint until reaching the specified cycles."}, - [302] = {"resize-damage" , INTEGER(resize_damage, INT_MIN, INT_MAX)}, // only used by legacy backends + [302] = {"resize-damage" , WARN_DEPRECATED(INTEGER(resize_damage, INT_MIN, INT_MAX))}, // only used by legacy backends [309] = {"unredir-if-possible-delay" , INTEGER(unredir_if_possible_delay, 0, INT_MAX) , "Delay before unredirecting the window, in milliseconds. Defaults to 0."}, [310] = {"write-pid-path" , NAMED_STRING(write_pid_path, "PATH") , "Write process ID to a file."}, [322] = {"log-file" , STRING(logpath) , "Path to the log file."},