mirror of https://github.com/yshui/picom.git
Remove the glx-swap-method option
Deprecated since v6. Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
parent
1e757dcfad
commit
f8424646a5
|
@ -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)) {
|
if (config_lookup_string(&cfg, "glx-swap-method", &sval)) {
|
||||||
char *endptr;
|
char *endptr;
|
||||||
long val = strtol(sval, &endptr, 10);
|
long val = strtol(sval, &endptr, 10);
|
||||||
|
bool should_remove = true;
|
||||||
if (*endptr || !(*sval)) {
|
if (*endptr || !(*sval)) {
|
||||||
// sval is not a number, or an empty string
|
// sval is not a number, or an empty string
|
||||||
val = -1;
|
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 (strcmp(sval, "undefined") != 0 && val != 0) {
|
||||||
// If not undefined, we will use damage and buffer-age to limit
|
// If not undefined, we will use damage and buffer-age to limit
|
||||||
// the rendering area.
|
// the rendering area.
|
||||||
opt->use_damage = true;
|
should_remove = false;
|
||||||
}
|
}
|
||||||
log_warn("glx-swap-method has been deprecated since v6, your setting "
|
log_error("glx-swap-method has been removed, your setting "
|
||||||
"\"%s\" should be %s.",
|
"\"%s\" should be %s.",
|
||||||
sval,
|
sval,
|
||||||
opt->use_damage ? "replaced by `use-damage = true`" : "removed");
|
!should_remove ? "replaced by `use-damage = true`" : "removed");
|
||||||
|
goto err;
|
||||||
}
|
}
|
||||||
// --use-damage
|
// --use-damage
|
||||||
lcfg_lookup_bool(&cfg, "use-damage", &opt->use_damage);
|
lcfg_lookup_bool(&cfg, "use-damage", &opt->use_damage);
|
||||||
|
|
|
@ -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 (strcmp(optarg, "undefined") != 0 && tmpval != 0) {
|
||||||
// If not undefined, we will use damage and buffer-age to
|
// If not undefined, we will use damage and buffer-age to
|
||||||
// limit the rendering area.
|
// limit the rendering area.
|
||||||
opt->use_damage = true;
|
|
||||||
should_remove = false;
|
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.",
|
"\"%s\" should be %s.",
|
||||||
optarg,
|
optarg,
|
||||||
!should_remove ? "replaced by `--use-damage`" :
|
!should_remove ? "replaced by `--use-damage`" :
|
||||||
"removed");
|
"removed");
|
||||||
|
failed = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 300:
|
case 300:
|
||||||
|
|
Loading…
Reference in New Issue