1
0
Fork 0
mirror of https://github.com/yshui/picom.git synced 2025-02-17 15:56:21 -05:00

config: prepare for animation trigger aliases

Aliases aren't triggers themselves so their numbering goes beyond
ANIMATION_TRIGGER_COUNT.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
Yuxuan Shui 2024-11-14 12:40:44 +00:00
parent 5302d0edbe
commit 1932635b08
No known key found for this signature in database
GPG key ID: D3A4405BE6CC17F4

View file

@ -227,8 +227,9 @@ static inline void parse_wintype_config(const config_t *cfg, const char *member_
}
enum animation_trigger parse_animation_trigger(const char *trigger) {
for (unsigned i = 0; i < ANIMATION_TRIGGER_COUNT; i++) {
if (strcasecmp(trigger, animation_trigger_names[i]) == 0) {
for (unsigned i = 0; i < ARR_SIZE(animation_trigger_names); i++) {
if (animation_trigger_names[i] != NULL &&
strcasecmp(trigger, animation_trigger_names[i]) == 0) {
return i;
}
}