X-Git-Url: https://git.artsoft.org/?p=rocksndiamonds.git;a=blobdiff_plain;f=src%2Fevents.c;h=11fd28f40035daab17fc49caf6e05a0995b8262c;hp=9966905b6286a496ee0a97868b2990105d6dc98a;hb=da0b032a906bd0fdadf798802c04c9084bee074c;hpb=c38790fcee093efb156366bb4a02dbde55085ca4 diff --git a/src/events.c b/src/events.c index 9966905b..11fd28f4 100644 --- a/src/events.c +++ b/src/events.c @@ -2145,9 +2145,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