summaryrefslogtreecommitdiff
path: root/src/lib/ecore_wayland
diff options
context:
space:
mode:
authorDuna Oh <duna.oh@samsung.com>2016-01-13 10:10:05 -0500
committerChris Michael <cpmichael@osg.samsung.com>2016-01-13 10:10:35 -0500
commit49ef37457adce6f7ac2fee6a1d4bf8b81806b47a (patch)
treebedbd2cd88004a5673fd08ae94c4e33cda4e850c /src/lib/ecore_wayland
parent6d16bdf2c9db6dd7de1a76de1d1441bc7b0eeacc (diff)
ecore_wayland: send mouse_move when sets touch_focus window in cb_touch_down
Summary: When user touches the screen, ecore_drm generates MOUSE_MOVE event before MOUSE_BUTTON_DOWN. But when ecore_wayland gets touch_motion before touch_down, touch_focus window is NULL and sending MOUSE_MOVE event fails. Also in terms of 'touch' input, touch_focus needs be set in cb_touch_down, not in cb_pointer_enter. So this commit makes sure that ecore_wayland generates MOUSE_MOVE when touch_focus is set. @fix Test Plan: when the application is launched for first time, user clicks on any area of the screen. We can see the posion of touch event wrong. Reviewers: raster, zmike, devilhorns, gwanglim, ManMower Reviewed By: ManMower Subscribers: jpeg, JHyun, cedric, input.hacker Differential Revision: https://phab.enlightenment.org/D3555
Diffstat (limited to 'src/lib/ecore_wayland')
-rw-r--r--src/lib/ecore_wayland/ecore_wl_input.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/lib/ecore_wayland/ecore_wl_input.c b/src/lib/ecore_wayland/ecore_wl_input.c
index 09d1d2f597..a69932f8bf 100644
--- a/src/lib/ecore_wayland/ecore_wl_input.c
+++ b/src/lib/ecore_wayland/ecore_wl_input.c
@@ -987,7 +987,6 @@ _ecore_wl_input_cb_pointer_enter(void *data, struct wl_pointer *pointer EINA_UNU
987 { 987 {
988 win->pointer_device = input; 988 win->pointer_device = input;
989 input->pointer_focus = win; 989 input->pointer_focus = win;
990 input->touch_focus = win;
991 990
992 if (win->pointer.set) 991 if (win->pointer.set)
993 { 992 {
@@ -1117,13 +1116,17 @@ _ecore_wl_input_cb_touch_down(void *data, struct wl_touch *touch EINA_UNUSED, un
1117 1116
1118 if (!(win = ecore_wl_window_surface_find(surface))) return; 1117 if (!(win = ecore_wl_window_surface_find(surface))) return;
1119 1118
1120 input->touch_focus = win;
1121 input->timestamp = timestamp; 1119 input->timestamp = timestamp;
1122 input->display->serial = serial; 1120 input->display->serial = serial;
1123 input->sx = wl_fixed_to_int(x); 1121 input->sx = wl_fixed_to_int(x);
1124 input->sy = wl_fixed_to_int(y); 1122 input->sy = wl_fixed_to_int(y);
1125 1123
1126 //_ecore_wl_input_mouse_move_send(input, input->touch_focus, timestamp, id); 1124 if (input->touch_focus != win)
1125 {
1126 input->touch_focus = win;
1127 _ecore_wl_input_mouse_move_send(input, input->touch_focus, timestamp, id);
1128 }
1129
1127 if (!input->grab_count) 1130 if (!input->grab_count)
1128 { 1131 {
1129 _ecore_wl_input_cb_pointer_enter(data, NULL, serial, surface, x, y); 1132 _ecore_wl_input_cb_pointer_enter(data, NULL, serial, surface, x, y);