[Title] modified mouse event type value
authorgiwoong.kim <giwoong.kim@samsung.com>
Thu, 8 Mar 2012 14:01:36 +0000 (23:01 +0900)
committergiwoong.kim <giwoong.kim@samsung.com>
Thu, 8 Mar 2012 14:01:36 +0000 (23:01 +0900)
[Type]
[Module]
[Priority]
[Jira#]
[Redmine#]
[Problem]
[Cause]
[Solution]
[TestCase]

tizen/src/hw/maru_touchscreen.c [changed mode: 0644->0755]
tizen/src/skin/maruskin_operation.c [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index 9a393b4..d0e0f4c
@@ -33,6 +33,9 @@
 #include "console.h"
 #include "usb.h"
 #include "usb-desc.h"
+#include "../debug_ch.h"
+
+MULTI_DEBUG_CHANNEL(qemu, maru_touchscreen);
 
 
 typedef struct USBTouchscreenState {
@@ -137,6 +140,8 @@ static void usb_touchscreen_event(void *opaque, int x, int y, int z, int buttons
     s->dz = z;
     s->buttons_state = buttons_state;
     s->changed = 1;
+
+    INFO("boo~~~%d,%d,%d,, %d", x, y, z, buttons_state);
 }
 
 static int usb_touchscreen_poll(USBTouchscreenState *s, uint8_t *buf, int len)
@@ -309,6 +314,7 @@ static struct USBDeviceInfo touchscreen_info = {
 
 static void usb_touchscreen_register_devices(void)
 {
+    INFO("boo~~~~~~~~~~~~~");
     usb_qdev_register(&touchscreen_info);
 }
 
old mode 100644 (file)
new mode 100755 (executable)
index b34b19c..34cee1d
@@ -72,13 +72,13 @@ void start_display( int handle_id, short scale, short direction ) {
 void do_mouse_event( int event_type, int x, int y, int z ) {
     INFO( "mouse_event event_type:%d, x:%d, y:%d, z:%d\n", event_type, x, y, z );
 
-    // qemu want to get '1' state in both press and drag.
-    int type = ( MOUSE_DRAG == event_type ) ? MOUSE_DOWN : event_type;
 
-    if ( MOUSE_UP == type || MOUSE_DOWN == type ) {
-        kbd_mouse_event(x, y, z, type);
+    if ( MOUSE_DOWN == event_type || MOUSE_DRAG == event_type) {
+        kbd_mouse_event(x, y, z, 1);
+    } else if (MOUSE_UP == event_type) {
+        kbd_mouse_event(x, y, z, 0);
     } else {
-        INFO( "undefined mouse event type:%d\n", type );
+        INFO( "undefined mouse event type:%d\n", event_type );
     }
 
 }