diff options
Diffstat (limited to 'src/window/window.c')
-rw-r--r-- | src/window/window.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/window/window.c b/src/window/window.c index 485e400..9bf6917 100644 --- a/src/window/window.c +++ b/src/window/window.c @@ -1566,7 +1566,19 @@ static void mgl_window_on_receive_event(mgl_window *self, XEvent *xev, mgl_event } case MappingNotify: { XRefreshKeyboardMapping(&xev->xmapping); - event->type = MGL_EVENT_UNKNOWN; + event->type = MGL_EVENT_MAPPING_NOTIFY; + event->mapping_notify.notify_type = MappingModifier; + switch(xev->xmapping.request) { + case MappingModifier: + event->mapping_notify.notify_type = MGL_MAPPING_NOTIFY_MODIFIER; + break; + case MappingKeyboard: + event->mapping_notify.notify_type = MGL_MAPPING_NOTIFY_KEYBOARD; + break; + case MappingPointer: + event->mapping_notify.notify_type = MGL_MAPPING_NOTIFY_POINTER; + break; + } break; } default: { |