From: Dana Jansens Date: Tue, 9 Feb 2010 00:29:02 +0000 (-0500) Subject: dont assert when there is no valid key layout present X-Git-Tag: xkb~6 X-Git-Url: http://git.openbox.org/?p=dana%2Fopenbox.git;a=commitdiff_plain;h=e9070fe7da03effb198c0bbae8293f22fdf36085 dont assert when there is no valid key layout present --- diff --git a/obt/keyboard.c b/obt/keyboard.c index 264201a..6bb1386 100644 --- a/obt/keyboard.c +++ b/obt/keyboard.c @@ -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,