From 1dcf4386daded816ea68e39ed8e22903420380d5 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Sun, 6 Nov 2022 12:12:49 +0100 Subject: Set event type unknown on invalid event --- src/window/window.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/window') diff --git a/src/window/window.c b/src/window/window.c index 8d63650..5ae4d3f 100644 --- a/src/window/window.c +++ b/src/window/window.c @@ -814,6 +814,8 @@ bool mgl_window_poll_event(mgl_window *self, mgl_event *event) { XNextEvent(display, &xev); if(xev.xany.window == self->window || event->type == ClientMessage) mgl_window_on_receive_event(self, &xev, event, context); + else + event->type = MGL_EVENT_UNKNOWN; return true; } else { return false; -- cgit v1.2.3