Move get_mod_mask to libi3, use it in i3 and i3-config-wizard
Also, the API changed a bit. There are two functions now, both assume you already got the keysyms (which is the case for i3 and i3-config-wizard), one gets the modifier mapping for you (aio_get_mod_mask_for) while the other assumes you also got that. No roundtrips are required for the latter.
This commit is contained in:
@ -286,7 +286,7 @@ static int handle_mapping_notify(xcb_mapping_notify_event_t *event) {
|
||||
DLOG("Received mapping_notify for keyboard or modifier mapping, re-grabbing keys\n");
|
||||
xcb_refresh_keyboard_mapping(keysyms, event);
|
||||
|
||||
xcb_get_numlock_mask(conn);
|
||||
xcb_numlock_mask = aio_get_mod_mask_for(XCB_NUM_LOCK, keysyms);
|
||||
|
||||
ungrab_all_keys(conn);
|
||||
translate_keysyms();
|
||||
|
Reference in New Issue
Block a user