From bffd02b8c73c0c378f8ce509530f17409a8cd943 Mon Sep 17 00:00:00 2001 From: Geoffrey McRae Date: Thu, 23 May 2019 20:31:01 +1000 Subject: [PATCH] [client] main: better UX with the escape key combinations --- VERSION | 2 +- client/src/main.c | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/VERSION b/VERSION index 7899d730..7371bb94 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -a12-228-gff08540fd3+1 \ No newline at end of file +a12-229-g196b27ee9c+1 \ No newline at end of file diff --git a/client/src/main.c b/client/src/main.c index b51c9e2a..8ba684bc 100644 --- a/client/src/main.c +++ b/client/src/main.c @@ -681,7 +681,7 @@ int eventFilter(void * userdata, SDL_Event * event) if (sc == params.escapeKey) { state.escapeActive = true; - state.escapeAction = sc; + state.escapeAction = -1; break; } @@ -716,7 +716,7 @@ int eventFilter(void * userdata, SDL_Event * event) SDL_Scancode sc = event->key.keysym.scancode; if (state.escapeActive) { - if (state.escapeAction == params.escapeKey) + if (state.escapeAction == -1) { if (params.useSpiceInput) { @@ -742,7 +742,8 @@ int eventFilter(void * userdata, SDL_Event * event) handle->callback(sc, handle->opaque); } - state.escapeActive = false; + if (sc == params.escapeKey) + state.escapeActive = false; } if (state.ignoreInput || !params.useSpiceInput)