From 89a66863491d0b5f1edea232da8f16236e23f58e Mon Sep 17 00:00:00 2001 From: Geoffrey McRae Date: Sun, 17 Jan 2021 13:33:42 +1100 Subject: [PATCH] [client] app: always call the default eventFilter for unhandled events This change allows much of the SDL code to be moved into the SDL displayserver implementation. --- client/src/main.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/client/src/main.c b/client/src/main.c index 4bb09999..6e33a922 100644 --- a/client/src/main.c +++ b/client/src/main.c @@ -1307,6 +1307,11 @@ int eventFilter(void * userdata, SDL_Event * event) if (g_state.ds->eventFilter(event)) return 0; + // always include the default handler (SDL) for any unhandled events + if (g_state.ds != LG_DisplayServers[0]) + if (LG_DisplayServers[0]->eventFilter(event)) + return 0; + if (event->type == e_SDLEvent) { switch(event->user.code)