[Title] Fixed a bug that emulator passes key inputs even though there is no usb keyboard.
authordon.hong <don.hong@samsung.com>
Mon, 19 Mar 2012 14:34:42 +0000 (23:34 +0900)
committerdon.hong <don.hong@samsung.com>
Mon, 19 Mar 2012 14:34:42 +0000 (23:34 +0900)
[Type] BugFix
[Module]
[Priority]
[CQ#]
[Redmine#]
[Problem]
[Cause]
[Solution]
[TestCase]

input.c
tizen/src/mloop_event.c
tizen/src/mloop_event.h
tizen/src/skin/maruskin_operation.c

diff --git a/input.c b/input.c
index b5e42af6671a9158c12ebd9e4fab667098364481..37c88c78951f2847147043889253ab0d18a8877d 100644 (file)
--- a/input.c
+++ b/input.c
@@ -57,7 +57,6 @@ void qemu_remove_kbd_event_handler(void)
 
 void qemu_add_ps2kbd_event_handler(QEMUPutKBDEvent *func, void *opaque)
 {
-    qemu_add_kbd_event_handler(func,opaque); // temporary code for compatibility with Xserver
     qemu_put_ps2kbd_event_opaque = opaque;
     qemu_put_ps2kbd_event = func;
 }
index cb4a60a1e024394734da06b6a4b1240c6e0c8fca..dd78596e27d148ebe954d2e4479475f4c60b0861 100644 (file)
@@ -266,3 +266,8 @@ void mloop_evcmd_usbkbd_off(void)
     struct mloop_evpack pack = { htons(MLOOP_EVTYPE_USB_DEL), htons(13), "keyboard" };\r
     mloop_evsock_send(&mloop, &pack);\r
 }\r
+\r
+int mloop_evcmd_get_usbkbd_status(void)\r
+{\r
+       return (usbkbd ? 1 : 0);\r
+}\r
index cc656a9ce9899e8c2c24cb00030590c8fcea92ce..48ae5089ca18a63a9052a9e5a6bc63517fb87565 100644 (file)
@@ -38,6 +38,9 @@ void mloop_ev_stop(void);
 void mloop_evcmd_usbkbd_on(void);\r
 void mloop_evcmd_usbkbd_off(void);\r
 \r
+int mloop_evcmd_get_usbkbd_status(void);\r
+\r
+\r
 #ifdef __cplusplus\r
 }\r
 #endif\r
index f59b5f3a1ca61104480c691719ba3f02131e843a..cae72805757da9939ff25239f761c64bc2bcee82 100644 (file)
@@ -85,6 +85,10 @@ void do_mouse_event( int event_type, int x, int y, int z ) {
 void do_key_event( int event_type, int keycode ) {
     TRACE( "key_event event_type:%d, keycode:%d\n", event_type, keycode );
 
+    if (!mloop_evcmd_get_usbkbd_status()) {
+       return;
+    }
+
     int scancode = javakeycode_to_scancode(keycode);
     if (scancode == -1) {
         INFO("cannot find scancode\n");