From b47d9a1856cd4867b1708d0ef241631b7a818411 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Mon, 15 Oct 2012 18:12:27 +0200 Subject: [PATCH 12/21] Add a warning if scancode lookup failed This helps tracking some send_keys() issues, such as https://bugzilla.gnome.org/show_bug.cgi?id=686170 --- gtk/spice-widget.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gtk/spice-widget.c b/gtk/spice-widget.c index 47afa40..391cd39 100644 --- a/gtk/spice-widget.c +++ b/gtk/spice-widget.c @@ -1192,6 +1192,9 @@ static guint get_scancode_from_keyval(SpiceDisplay *display, guint keyval) /* FIXME what about levels? */ keycode = keys[0].keycode; g_free(keys); + } else { + g_warning("could not lookup keyval %u, please report a bug", keyval); + return 0; } return vnc_display_keymap_gdk2xtkbd(d->keycode_map, d->keycode_maplen, keycode); -- 1.7.12.1