dont assert when there is no valid key layout present

This commit is contained in:
Dana Jansens 2010-02-08 19:29:02 -05:00
parent 4f83a15fa1
commit e9070fe7da

View file

@ -61,7 +61,8 @@ void obt_keyboard_reload(void)
modkeys_keys[i] = 0;
modmap = XGetModifierMapping(obt_display);
g_assert(modmap->max_keypermod > 0);
/* note: modmap->max_keypermod can be 0 when there is no valid key layout
available */
XDisplayKeycodes(obt_display, &min_keycode, &max_keycode);
keymap = XGetKeyboardMapping(obt_display, min_keycode,