From 042c829823b203d41f35adebc0e62c761335b570 Mon Sep 17 00:00:00 2001 From: Duna Oh Date: Mon, 11 Jan 2016 11:14:36 +0900 Subject: [PATCH] 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. Signed-off-by: Duna Oh Change-Id: I721c0dc7248a885c57c64d3957e0bd84cd7ce1bd --- src/lib/ecore_wayland/ecore_wl_input.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/lib/ecore_wayland/ecore_wl_input.c b/src/lib/ecore_wayland/ecore_wl_input.c index 96eca70..ac7ff50 100644 --- a/src/lib/ecore_wayland/ecore_wl_input.c +++ b/src/lib/ecore_wayland/ecore_wl_input.c @@ -1044,7 +1044,6 @@ _ecore_wl_input_cb_pointer_enter(void *data, struct wl_pointer *pointer EINA_UNU { win->pointer_device = input; input->pointer_focus = win; - input->touch_focus = win; if (win->pointer.set) { @@ -1172,13 +1171,16 @@ _ecore_wl_input_cb_touch_down(void *data, struct wl_touch *touch EINA_UNUSED, un if (!(win = ecore_wl_window_surface_find(surface))) return; - input->touch_focus = win; input->timestamp = timestamp; input->display->serial = serial; input->sx = wl_fixed_to_int(x); input->sy = wl_fixed_to_int(y); + if (input->touch_focus != win) + { + input->touch_focus = win; + _ecore_wl_input_mouse_move_send(input, input->touch_focus, timestamp, id); + } - //_ecore_wl_input_mouse_move_send(input, input->touch_focus, timestamp, id); if (!input->grab_count) { _ecore_wl_input_cb_pointer_enter(data, NULL, serial, surface, x, y); -- 2.7.4