[PATCH] Not getting a keymap should not be fatal

All GTK+ applications abort upon first key press in case XKB extension
is not present.

This is probably less optimal than it could be, because in case of lack
of XKB extension, this causes a XkbGetMap() call on each key press as
well as ugly warning on error output. Maybe a better idea would be to
keep track of whether XkbGetMap() failed separately from xkb_desc.
 gdk/x11/gdkkeys-x11.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/gdk/x11/gdkkeys-x11.c b/gdk/x11/gdkkeys-x11.c
index e0a7414..ee707cc 100644
--- a/gdk/x11/gdkkeys-x11.c
+++ b/gdk/x11/gdkkeys-x11.c
@@ -257,7 +257,7 @@ get_xkb (GdkKeymapX11 *keymap_x11)
       keymap_x11->xkb_desc = XkbGetMap (xdisplay, XkbKeySymsMask | XkbKeyTypesMask | XkbModifierMapMask | XkbVirtualModsMask, XkbUseCoreKbd);
       if (keymap_x11->xkb_desc == NULL)
-	  g_error ("Failed to get keymap");
+	  g_warning ("Failed to get keymap");
           return NULL;

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]