[Spice-commits] gtk/vncdisplaykeymap.c
Marc-André Lureau
elmarco at kemper.freedesktop.org
Mon Feb 23 02:52:56 PST 2015
gtk/vncdisplaykeymap.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
New commits:
commit 95e322a6bbc29dc9c28724fb80706464e276b89f
Author: Pavel Grunt <pgrunt at redhat.com>
Date: Fri Feb 20 16:19:50 2015 +0100
vncdisplaykeymap: Use XkbGetMap and XkbGetNames instead of XkbGetKeyboard
XkbGetKeyboard does not work in XWayland (bfo#89240).
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=89105
diff --git a/gtk/vncdisplaykeymap.c b/gtk/vncdisplaykeymap.c
index 340a86f..6bf351f 100644
--- a/gtk/vncdisplaykeymap.c
+++ b/gtk/vncdisplaykeymap.c
@@ -175,11 +175,12 @@ const guint16 *vnc_display_keymap_gdk2xtkbd_table(GdkWindow *window,
* X servers..... patches welcomed.
*/
- desc = XkbGetKeyboard(gdk_x11_display_get_xdisplay(dpy),
+ Display *xdisplay = gdk_x11_display_get_xdisplay(dpy);
+ desc = XkbGetMap(xdisplay,
XkbGBN_AllComponentsMask,
XkbUseCoreKbd);
if (desc) {
- if (desc->names) {
+ if (XkbGetNames(xdisplay, XkbKeycodesNameMask, desc) == Success) {
keycodes = gdk_x11_get_xatom_name(desc->names->keycodes);
if (!keycodes)
g_warning("could not lookup keycode name");
@@ -195,11 +196,11 @@ const guint16 *vnc_display_keymap_gdk2xtkbd_table(GdkWindow *window,
VNC_DEBUG("Using xquartz keycode mapping");
*maplen = G_N_ELEMENTS(keymap_xorgxquartz2xtkbd);
return keymap_xorgxquartz2xtkbd;
- } else if (keycodes && STRPREFIX(keycodes, "evdev_")) {
+ } else if (keycodes && STRPREFIX(keycodes, "evdev")) {
VNC_DEBUG("Using evdev keycode mapping");
*maplen = G_N_ELEMENTS(keymap_xorgevdev2xtkbd);
return keymap_xorgevdev2xtkbd;
- } else if (keycodes && STRPREFIX(keycodes, "xfree86_")) {
+ } else if (keycodes && STRPREFIX(keycodes, "xfree86")) {
VNC_DEBUG("Using xfree86 keycode mapping");
*maplen = G_N_ELEMENTS(keymap_xorgkbd2xtkbd);
return keymap_xorgkbd2xtkbd;
More information about the Spice-commits
mailing list