-
- boolean clickable_self = FALSE;
- boolean clickable_triggered = FALSE;
-
- if (mask & ANIM_EVENT_CLICK_SELF)
- clickable_self = (c->init_event & ANIM_EVENT_CLICK_SELF ||
- c->anim_event & ANIM_EVENT_CLICK_SELF);
-
- clickable_triggered = (matchesAnimEventMask(c->init_event, mask) ||
- matchesAnimEventMask(c->anim_event, mask));
-
- return (clickable_self || clickable_triggered);
+ int trigger_mask = ANIM_EVENT_ANIM_MASK | ANIM_EVENT_PART_MASK;
+ int mask_anim_only = mask & ANIM_EVENT_ANIM_MASK;
+
+ if (mask & ANIM_EVENT_ANY)
+ return (c->init_event & ANIM_EVENT_ANY ||
+ c->anim_event & ANIM_EVENT_ANY);
+ else if (mask & ANIM_EVENT_SELF)
+ return (c->init_event & ANIM_EVENT_SELF ||
+ c->anim_event & ANIM_EVENT_SELF);
+ else
+ return ((c->init_event & trigger_mask) == mask ||
+ (c->anim_event & trigger_mask) == mask ||
+ (c->init_event & trigger_mask) == mask_anim_only ||
+ (c->anim_event & trigger_mask) == mask_anim_only);