diff options
author | dec05eba <dec05eba@protonmail.com> | 2022-11-06 12:12:49 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2022-11-06 12:12:49 +0100 |
commit | 1dcf4386daded816ea68e39ed8e22903420380d5 (patch) | |
tree | 3c29c357a40302a3e97a23a561a56ab8e17c4b14 /src | |
parent | 3c4deef40ccb57e46e3da30c76dee1e5011d7fd7 (diff) |
Set event type unknown on invalid event
Diffstat (limited to 'src')
-rw-r--r-- | src/window/window.c | 2 |
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; |