diff options
-rw-r--r-- | include/mgl/window/event.h | 16 | ||||
-rw-r--r-- | src/window/window.c | 10 |
2 files changed, 13 insertions, 13 deletions
diff --git a/include/mgl/window/event.h b/include/mgl/window/event.h index ab7ce35..0f0d94e 100644 --- a/include/mgl/window/event.h +++ b/include/mgl/window/event.h @@ -60,14 +60,14 @@ typedef struct { } mgl_monitor_disconnected_event; typedef enum { - MGL_MAPPING_NOTIFY_MODIFIER, - MGL_MAPPING_NOTIFY_KEYBOARD, - MGL_MAPPING_NOTIFY_POINTER -} mgl_mapping_notify_type; + MGL_MAPPING_CHANGED_MODIFIER, + MGL_MAPPING_CHANGED_KEYBOARD, + MGL_MAPPING_CHANGED_POINTER +} mgl_mapping_changed_type; typedef struct { - int notify_type; /* mgl_mapping_notify_type */ -} mgl_mapping_notify_event; + int type; /* mgl_mapping_changed_type */ +} mgl_mapping_changed_event; typedef enum { MGL_EVENT_UNKNOWN, @@ -85,7 +85,7 @@ typedef enum { MGL_EVENT_MONITOR_CONNECTED, MGL_EVENT_MONITOR_DISCONNECTED, MGL_EVENT_MONITOR_PROPERTY_CHANGED, - MGL_EVENT_MAPPING_NOTIFY + MGL_EVENT_MAPPING_CHANGED } mgl_event_type; struct mgl_event { @@ -100,7 +100,7 @@ struct mgl_event { mgl_monitor_connected_event monitor_connected; mgl_monitor_disconnected_event monitor_disconnected; mgl_monitor_property_changed_event monitor_property_changed; - mgl_mapping_notify_event mapping_notify; + mgl_mapping_changed_event mapping_changed; }; }; diff --git a/src/window/window.c b/src/window/window.c index 9bf6917..a70e0d9 100644 --- a/src/window/window.c +++ b/src/window/window.c @@ -1566,17 +1566,17 @@ static void mgl_window_on_receive_event(mgl_window *self, XEvent *xev, mgl_event } case MappingNotify: { XRefreshKeyboardMapping(&xev->xmapping); - event->type = MGL_EVENT_MAPPING_NOTIFY; - event->mapping_notify.notify_type = MappingModifier; + event->type = MGL_EVENT_MAPPING_CHANGED; + event->mapping_changed.type = MappingModifier; switch(xev->xmapping.request) { case MappingModifier: - event->mapping_notify.notify_type = MGL_MAPPING_NOTIFY_MODIFIER; + event->mapping_changed.type = MGL_MAPPING_CHANGED_MODIFIER; break; case MappingKeyboard: - event->mapping_notify.notify_type = MGL_MAPPING_NOTIFY_KEYBOARD; + event->mapping_changed.type = MGL_MAPPING_CHANGED_KEYBOARD; break; case MappingPointer: - event->mapping_notify.notify_type = MGL_MAPPING_NOTIFY_POINTER; + event->mapping_changed.type = MGL_MAPPING_CHANGED_POINTER; break; } break; |