have obt refresh the xlib keyboard stuff on mappingnotify events

This commit is contained in:
Dana Jansens 2010-02-12 13:31:49 -05:00
parent 7c2eb3a781
commit 98c86118ca
2 changed files with 3 additions and 1 deletions

View file

@ -300,6 +300,9 @@ void obt_main_loop_run(ObtMainLoop *loop)
do {
XNextEvent(loop->display, &e);
if (e.type == MappingNotify)
XRefreshKeyboardMapping(&e.xmapping);
for (it = loop->x_handlers; it; it = g_slist_next(it)) {
ObtMainLoopXHandlerType *h = it->data;
h->func(&e, h->data);

View file

@ -638,7 +638,6 @@ static void event_process(const XEvent *ec, gpointer data)
modifier map, and rebind all the key bindings as appropriate */
ob_debug("Keyboard map changed. Reloading keyboard bindings.");
ob_set_state(OB_STATE_RECONFIGURING);
XRefreshKeyboardMapping(&e->xmapping);
obt_keyboard_reload();
keyboard_rebind();
ob_set_state(OB_STATE_RUNNING);