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) {