X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Fevents.c;h=17f528e9415aadc78f26f411a7d550e5292c2553;hb=0e2c16077f04479625b1612b19047332026433c7;hp=9966905b6286a496ee0a97868b2990105d6dc98a;hpb=c38790fcee093efb156366bb4a02dbde55085ca4;p=rocksndiamonds.git diff --git a/src/events.c b/src/events.c index 9966905b..17f528e9 100644 --- a/src/events.c +++ b/src/events.c @@ -1607,6 +1607,14 @@ void HandleUserEvent(UserEvent *event) { switch (event->code) { + case USEREVENT_ANIM_EVENT_ACTION: + // execute action functions until matching action was found + if (DoKeysymAction(event->value1) || + DoGadgetAction(event->value1) || + DoScreenAction(event->value1)) + return; + break; + default: break; } @@ -2145,9 +2153,12 @@ void HandleKey(Key key, int key_status) return; } - if (HandleGlobalAnimClicks(-1, -1, (key == KSYM_space || - key == KSYM_Return || - key == KSYM_Escape), TRUE)) + // some key events are handled like clicks for global animations + boolean click = (key == KSYM_space || + key == KSYM_Return || + key == KSYM_Escape); + + if (click && HandleGlobalAnimClicks(-1, -1, MB_LEFTBUTTON, TRUE)) { // do not handle this key event anymore if (key != KSYM_Escape) // always allow ESC key to be handled