aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2022-11-06 12:12:49 +0100
committerdec05eba <dec05eba@protonmail.com>2022-11-06 12:12:49 +0100
commit1dcf4386daded816ea68e39ed8e22903420380d5 (patch)
tree3c29c357a40302a3e97a23a561a56ab8e17c4b14 /src
parent3c4deef40ccb57e46e3da30c76dee1e5011d7fd7 (diff)
Set event type unknown on invalid event
Diffstat (limited to 'src')
-rw-r--r--src/window/window.c2
1 files changed, 2 insertions, 0 deletions
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;