[PATCH] Not getting a keymap should not be fatal
- From: Lubomir Rintel <lkundrak v3 sk>
- To: gtk-devel-list gnome org
- Cc: Lubomir Rintel <lkundrak v3 sk>
- Subject: [PATCH] Not getting a keymap should not be fatal
- Date: Wed, 15 Sep 2010 08:58:49 +0200
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;
}
--
1.7.2.3
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]