From 4e12340507dabf939fcc2805053e91a90cb1d476 Mon Sep 17 00:00:00 2001 From: Bob Polis Date: Sat, 24 Oct 2020 23:15:21 +0200 Subject: [PATCH] changed event handling order to have custom handlers fire first --- Window.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Window.cpp b/Window.cpp index a84792a..5070352 100644 --- a/Window.cpp +++ b/Window.cpp @@ -36,12 +36,12 @@ Window* Window::from_sdl(Uint32 window_id) { } bool Window::handle_window_event(const SDL_Event& event) { - bool quit {handle_global_event(event)}; + bool quit {false}; Window* w {from_sdl(event.window.windowID)}; if (w) { - return w->handle_event(event, quit); + quit = w->handle_event(event, quit); } - return quit; + return quit | handle_global_event(event); } bool Window::handle_global_event(const SDL_Event& event) {