[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 13/42] input: keyboard: switch gtk ui to new core
From: |
Gerd Hoffmann |
Subject: |
[Qemu-devel] [PATCH 13/42] input: keyboard: switch gtk ui to new core |
Date: |
Tue, 28 Jan 2014 10:57:06 +0100 |
Signed-off-by: Gerd Hoffmann <address@hidden>
---
ui/gtk.c | 19 ++++---------------
1 file changed, 4 insertions(+), 15 deletions(-)
diff --git a/ui/gtk.c b/ui/gtk.c
index a633d89..74c0936 100644
--- a/ui/gtk.c
+++ b/ui/gtk.c
@@ -59,6 +59,7 @@
#include "trace.h"
#include "ui/console.h"
+#include "ui/input.h"
#include "sysemu/sysemu.h"
#include "qmp-commands.h"
#include "x_keymap.h"
@@ -280,10 +281,7 @@ static void gtk_release_modifiers(GtkDisplayState *s)
if (!s->modifier_pressed[i]) {
continue;
}
- if (keycode & SCANCODE_GREY) {
- kbd_put_keycode(SCANCODE_EMUL0);
- }
- kbd_put_keycode(keycode | SCANCODE_UP);
+ qemu_input_event_send_key_number(s->dcl.con, keycode, false);
s->modifier_pressed[i] = false;
}
}
@@ -745,17 +743,8 @@ static gboolean gd_key_event(GtkWidget *widget,
GdkEventKey *key, void *opaque)
}
}
- if (qemu_keycode & SCANCODE_GREY) {
- kbd_put_keycode(SCANCODE_EMUL0);
- }
-
- if (key->type == GDK_KEY_PRESS) {
- kbd_put_keycode(qemu_keycode & SCANCODE_KEYCODEMASK);
- } else if (key->type == GDK_KEY_RELEASE) {
- kbd_put_keycode(qemu_keycode | SCANCODE_UP);
- } else {
- g_assert_not_reached();
- }
+ qemu_input_event_send_key_number(s->dcl.con, qemu_keycode,
+ key->type == GDK_KEY_PRESS);
return TRUE;
}
--
1.8.3.1
- [Qemu-devel] [PATCH 03/42] sdl2: remove text console logic, (continued)
- [Qemu-devel] [PATCH 03/42] sdl2: remove text console logic, Gerd Hoffmann, 2014/01/28
- [Qemu-devel] [PATCH 12/42] input: keyboard: switch qmp_send_key() to new core., Gerd Hoffmann, 2014/01/28
- [Qemu-devel] [PATCH 01/42] ui/sdl2 : initial port to SDL 2.0 (v2.0), Gerd Hoffmann, 2014/01/28
- [Qemu-devel] [PATCH 17/42] input: keyboard: switch spice ui to new core, Gerd Hoffmann, 2014/01/28
- [Qemu-devel] [PATCH 21/42] input: mouse: add qemu_input_is_absolute(), Gerd Hoffmann, 2014/01/28
- [Qemu-devel] [PATCH 14/42] input: keyboard: switch sdl ui to new core, Gerd Hoffmann, 2014/01/28
- [Qemu-devel] [PATCH 18/42] input: keyboard: switch curses ui to new core, Gerd Hoffmann, 2014/01/28
- [Qemu-devel] [PATCH 09/42] input: add core bits of the new input layer, Gerd Hoffmann, 2014/01/28
- [Qemu-devel] [PATCH 23/42] input: mouse: switch gtk ui to new core, Gerd Hoffmann, 2014/01/28
- [Qemu-devel] [PATCH 05/42] input: rename file to legacy, Gerd Hoffmann, 2014/01/28
- [Qemu-devel] [PATCH 13/42] input: keyboard: switch gtk ui to new core,
Gerd Hoffmann <=
- [Qemu-devel] [PATCH 11/42] input: keyboard: switch legacy handlers to new core, Gerd Hoffmann, 2014/01/28
- [Qemu-devel] [PATCH 25/42] sdl2: switch mouse handling to new core, Gerd Hoffmann, 2014/01/28
- [Qemu-devel] [PATCH 16/42] input: keyboard: switch vnc ui to new core, Gerd Hoffmann, 2014/01/28
- [Qemu-devel] [PATCH 27/42] input: mouse: switch spice ui to new core, Gerd Hoffmann, 2014/01/28
- [Qemu-devel] [PATCH 15/42] sdl2: switch keyboard handling to new core, Gerd Hoffmann, 2014/01/28
- [Qemu-devel] [PATCH 06/42] input: qapi: define event types, Gerd Hoffmann, 2014/01/28
- [Qemu-devel] [PATCH 26/42] input: mouse: switch vnc ui to new core, Gerd Hoffmann, 2014/01/28
- [Qemu-devel] [PATCH 22/42] input: mouse: switch legacy handlers to new core, Gerd Hoffmann, 2014/01/28
- [Qemu-devel] [PATCH 35/42] input-legacy: remove kbd_mouse_event, Gerd Hoffmann, 2014/01/28