xcb: Add XKB_NEW_KEYBOARD_NOTIFY support

Should not matter much for us, but not hard to support anyway.

Signed-off-by: Quentin Glidic <sardemff7+git@sardemff7.net>
This commit is contained in:
Quentin Glidic 2017-12-18 17:51:58 +01:00
parent 30b8e0ef43
commit e9532f584f
No known key found for this signature in database
GPG key ID: AC203F96E2C34BB7

View file

@ -782,6 +782,13 @@ static gboolean main_loop_x11_event_handler ( xcb_generic_event_t *ev, G_GNUC_UN
if ( type == xcb->xkb.first_event ) { if ( type == xcb->xkb.first_event ) {
switch ( ev->pad0 ) switch ( ev->pad0 )
{ {
case XCB_XKB_NEW_KEYBOARD_NOTIFY:
{
xcb_xkb_new_keyboard_notify_event_t *knkne = (xcb_xkb_new_keyboard_notify_event_t *) ev;
if ( ! ( knkne->changed & XCB_XKB_NKN_DETAIL_KEYCODES ) )
break;
}
/* fallthrough */
case XCB_XKB_MAP_NOTIFY: case XCB_XKB_MAP_NOTIFY:
{ {
struct xkb_keymap *keymap = xkb_x11_keymap_new_from_device ( nk_bindings_seat_get_context ( xcb->bindings_seat ), xcb->connection, xcb->xkb.device_id, 0 ); struct xkb_keymap *keymap = xkb_x11_keymap_new_from_device ( nk_bindings_seat_get_context ( xcb->bindings_seat ), xcb->connection, xcb->xkb.device_id, 0 );