Set ratio_w,h for event_set_xy 04/40804/1 accepted/tizen/mobile/20150611.004819 submit/tizen/20150609.095705 submit/tizen_mobile/20150609.095810
authorSung-jae Park <nicesj.park@samsung.com>
Tue, 9 Jun 2015 07:53:31 +0000 (16:53 +0900)
committerSung-jae Park <nicesj.park@samsung.com>
Tue, 9 Jun 2015 07:53:31 +0000 (16:53 +0900)
Change-Id: Ie0b0c80900ccfcbc0dff1ba7b58d3a16042f0881

include/event.h
src/event.c
src/server.c

index 924ab94..64acb5b 100644 (file)
@@ -64,6 +64,6 @@ extern int event_reset_cbdata(int (*event_cb)(enum event_state state, struct eve
 extern int event_deactivate_thread(enum event_handler_activate_type activate_type);
 extern int event_activate_thread(enum event_handler_activate_type activate_type);
 
-extern void event_set_mouse_xy(int x, int y, double timestamp);
+extern void event_set_mouse_xy(int x, int y, double ratio_w, double ratio_h, double timestamp);
 
 /* End of a file */
index 4b8872e..47ce633 100644 (file)
@@ -1103,10 +1103,12 @@ HAPI int event_is_activated(void)
        return s_info.handle >= 0;
 }
 
-HAPI void event_set_mouse_xy(int x, int y, double timestamp)
+HAPI void event_set_mouse_xy(int x, int y, double ratio_w, double ratio_h, double timestamp)
 {
        s_info.event_data.x = x;
        s_info.event_data.y = y;
+       s_info.event_data.ratio_w = ratio_w;
+       s_info.event_data.ratio_h = ratio_h;
        s_info.event_data.tv = timestamp;
        s_info.event_data.source = INPUT_EVENT_SOURCE_VIEWER;
        /**
index 6441984..6722a98 100644 (file)
@@ -2348,7 +2348,7 @@ static struct packet *client_widget_mouse_unset(pid_t pid, int handle, const str
        if (package_widget_type(pkg) == WIDGET_TYPE_BUFFER) {
                if (package_direct_input(pkg) == 0) {
                        /* Forcely update the X,Y position using viewer's */
-                       event_set_mouse_xy(x * ratio_w, y * ratio_h, timestamp);
+                       event_set_mouse_xy(x, y, ratio_w, ratio_h, timestamp);
 
                        ret = event_deactivate(mouse_event_widget_route_cb, inst);
                        if (WIDGET_CONF_SLAVE_EVENT_BOOST_OFF != WIDGET_CONF_SLAVE_EVENT_BOOST_ON) {
@@ -2375,7 +2375,7 @@ static struct packet *client_widget_mouse_unset(pid_t pid, int handle, const str
                }
        } else if (package_widget_type(pkg) == WIDGET_TYPE_SCRIPT) {
                /* Forcely update the X,Y position using viewer's */
-               event_set_mouse_xy(x * ratio_w, y * ratio_h, timestamp);
+               event_set_mouse_xy(x, y, ratio_w, ratio_h, timestamp);
 
                ret = event_deactivate(mouse_event_widget_consume_cb, inst);
                if (WIDGET_CONF_SLAVE_EVENT_BOOST_OFF != WIDGET_CONF_SLAVE_EVENT_BOOST_ON) {
@@ -2973,7 +2973,7 @@ static struct packet *client_gbar_mouse_unset(pid_t pid, int handle, const struc
        if (package_gbar_type(pkg) == GBAR_TYPE_BUFFER) {
                if (package_direct_input(pkg) == 0) {
                        /* Forcely update the X,Y position using viewer's */
-                       event_set_mouse_xy(x * ratio_w, y * ratio_h, timestamp);
+                       event_set_mouse_xy(x, y, ratio_w, ratio_h, timestamp);
 
                        ret = event_deactivate(mouse_event_gbar_route_cb, inst);
                        if (WIDGET_CONF_SLAVE_EVENT_BOOST_OFF != WIDGET_CONF_SLAVE_EVENT_BOOST_ON) {
@@ -3000,7 +3000,7 @@ static struct packet *client_gbar_mouse_unset(pid_t pid, int handle, const struc
                }
        } else if (package_gbar_type(pkg) == GBAR_TYPE_SCRIPT) {
                /* Forcely update the X,Y position using viewer's */
-               event_set_mouse_xy(x * ratio_w, y * ratio_h, timestamp);
+               event_set_mouse_xy(x, y, ratio_w, ratio_h, timestamp);
 
                ret = event_deactivate(mouse_event_gbar_consume_cb, inst);
                if (WIDGET_CONF_SLAVE_EVENT_BOOST_OFF != WIDGET_CONF_SLAVE_EVENT_BOOST_ON) {