gtk: fix memory leak, add pause key support.
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iQIcBAABAgAGBQJUPkzPAAoJEEy22O7T6HE4c7kQAKY6VYxQbtRQxhU5H4Il2f2X q2J+/0JZa6oeB3cSLztGiB3N+Rdt9Hdj8wpCI1AP70L9jerpTn7zoO6knalySYc9 vVPJbNbyrMv5ABlJrQ2Ls3k+UDJF2Kusb+Nxk5TIKkG1O+ys4wXL3vdW3/PjX6MO nOGkRz7nzmFnXmxos6ziltWleQXggI46YpomMFukOlh2p7uOf4dMUG7QcW4GgGza xCF2nqpLJAjyYWSQGP5YqH0/laa7yyQd9UWPZ0fqk7xEbFTccU+eGo9wqSs3DY1N pza0iVBAx8hgS38g5zzLoq4pWlLL7W2vlljIBpAIIWPA43Tmhs90z0pPlSuMmwe5 Xtv4r7KWd5I5dYtxBD6OYbVhgx+lF92cw2/mdKx2AOa+11xNqPaMZQ5RJ4ExajWP u5u9gzm0ZSl1aTyKZt0SV4s9ljnaHf1QKeMqc75t2d//GAAyGo5xGprJzF1CcIRw zovc3C5rzwjzU5yakUKFYvQ1EBhyqW4DKbqndj2IkdGChu3WNDn6M64lJvkA9ag/ B2MIyJ9T1b88yJX7aVrNLBEG0Z/eZo4Mix7Z2gIGnblTuunMJQbC3t1DmjE7up+/ WlYEnho8QGrpAboHXlUuty81D+HrWmhLLWoHNKmkcZ38E90AibRbRGFmBtsPt6l0 dzUfEHEmq4OAbqPxxFOh =MJ00 -----END PGP SIGNATURE----- Merge remote-tracking branch 'remotes/kraxel/tags/pull-gtk-20141015-1' into staging gtk: fix memory leak, add pause key support. # gpg: Signature made Wed 15 Oct 2014 11:30:39 BST using RSA key ID D3E87138 # gpg: Good signature from "Gerd Hoffmann (work) <kraxel@redhat.com>" # gpg: aka "Gerd Hoffmann <gerd@kraxel.org>" # gpg: aka "Gerd Hoffmann (private) <kraxel@gmail.com>" * remotes/kraxel/tags/pull-gtk-20141015-1: gtk: add support for the Pause key gtk.c: Fix memory leak in gd_set_keycode_type() Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
commit
4b4ce6c2b8
13
ui/gtk.c
13
ui/gtk.c
@ -931,6 +931,12 @@ static gboolean gd_key_event(GtkWidget *widget, GdkEventKey *key, void *opaque)
|
|||||||
int qemu_keycode;
|
int qemu_keycode;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
if (key->keyval == GDK_KEY_Pause) {
|
||||||
|
qemu_input_event_send_key_qcode(vc->gfx.dcl.con, Q_KEY_CODE_PAUSE,
|
||||||
|
key->type == GDK_KEY_PRESS);
|
||||||
|
return TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
qemu_keycode = gd_map_keycode(s, gtk_widget_get_display(widget),
|
qemu_keycode = gd_map_keycode(s, gtk_widget_get_display(widget),
|
||||||
gdk_keycode);
|
gdk_keycode);
|
||||||
|
|
||||||
@ -1810,6 +1816,13 @@ static void gd_set_keycode_type(GtkDisplayState *s)
|
|||||||
fprintf(stderr, "unknown keycodes `%s', please report to "
|
fprintf(stderr, "unknown keycodes `%s', please report to "
|
||||||
"qemu-devel@nongnu.org\n", keycodes);
|
"qemu-devel@nongnu.org\n", keycodes);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (desc) {
|
||||||
|
XkbFreeKeyboard(desc, XkbGBN_AllComponentsMask, True);
|
||||||
|
}
|
||||||
|
if (keycodes) {
|
||||||
|
XFree(keycodes);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user