Skip to content

Commit

Permalink
config: fix use of the "geometry" alias in animation suppressions
Browse files Browse the repository at this point in the history
Signed-off-by: Yuxuan Shui <[email protected]>
  • Loading branch information
yshui committed Nov 14, 2024
1 parent a017833 commit 801553f
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/config_libconfig.c
Original file line number Diff line number Diff line change
Expand Up @@ -423,6 +423,19 @@ static bool parse_animation_one(struct win_script *animations,
config_setting_remove(setting, "suppressions");
}

if ((result.suppressions & (1 << ANIMATION_TRIGGER_ALIAS_GEOMETRY)) != 0) {
const uint64_t to_set =
(1 << ANIMATION_TRIGGER_SIZE) | (1 << ANIMATION_TRIGGER_POSITION);
if ((result.suppressions & to_set) != 0) {
log_warn("Trigger \"geometry\" is an alias of \"size\" and "
"\"position\", but one or both of them are also set at "
"line %d",
config_setting_source_line(suppressions_setting));
}
result.suppressions |= to_set;
}
result.suppressions &= (1 << ANIMATION_TRIGGER_COUNT) - 1;

char *err;
if (!compile_win_script(&result, setting, &err)) {
log_error("Failed to parse animation script at line %d: %s",
Expand Down

0 comments on commit 801553f

Please sign in to comment.