Remove the glx-swap-method option

Deprecated since v6.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
Yuxuan Shui 2022-01-24 18:12:31 +00:00
parent 1e757dcfad
commit f8424646a5
No known key found for this signature in database
GPG Key ID: D3A4405BE6CC17F4
2 changed files with 9 additions and 7 deletions

View File

@ -580,6 +580,7 @@ char *parse_config_libconfig(options_t *opt, const char *config_file, bool *shad
if (config_lookup_string(&cfg, "glx-swap-method", &sval)) {
char *endptr;
long val = strtol(sval, &endptr, 10);
bool should_remove = true;
if (*endptr || !(*sval)) {
// sval is not a number, or an empty string
val = -1;
@ -587,12 +588,13 @@ char *parse_config_libconfig(options_t *opt, const char *config_file, bool *shad
if (strcmp(sval, "undefined") != 0 && val != 0) {
// If not undefined, we will use damage and buffer-age to limit
// the rendering area.
opt->use_damage = true;
should_remove = false;
}
log_warn("glx-swap-method has been deprecated since v6, your setting "
"\"%s\" should be %s.",
sval,
opt->use_damage ? "replaced by `use-damage = true`" : "removed");
log_error("glx-swap-method has been removed, your setting "
"\"%s\" should be %s.",
sval,
!should_remove ? "replaced by `use-damage = true`" : "removed");
goto err;
}
// --use-damage
lcfg_lookup_bool(&cfg, "use-damage", &opt->use_damage);

View File

@ -766,14 +766,14 @@ bool get_cfg(options_t *opt, int argc, char *const *argv, bool shadow_enable,
if (strcmp(optarg, "undefined") != 0 && tmpval != 0) {
// If not undefined, we will use damage and buffer-age to
// limit the rendering area.
opt->use_damage = true;
should_remove = false;
}
log_warn("--glx-swap-method has been deprecated, your setting "
log_error("--glx-swap-method has been removed, your setting "
"\"%s\" should be %s.",
optarg,
!should_remove ? "replaced by `--use-damage`" :
"removed");
failed = true;
break;
}
case 300: