From 2a20ca44775d1d8dbb39a61d4784390d4120d916 Mon Sep 17 00:00:00 2001 From: Rafael Antognolli Date: Wed, 8 May 2013 14:01:23 -0300 Subject: [PATCH] ecore_evas/wayland: Do not send additional mouse_in's. If this Ecore_Evas already has a mouse inside it, there's no need to send an additional mouse in event. Additionally, always send a mouse_move event before a mouse_down, so the Evas pointer position can be updated properly before the mouse down. --- src/lib/ecore_wayland/ecore_wl_input.c | 1 + .../ecore_evas/engines/wayland/ecore_evas_wayland_common.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/src/lib/ecore_wayland/ecore_wl_input.c b/src/lib/ecore_wayland/ecore_wl_input.c index b157bd0421..0b7837bf26 100644 --- a/src/lib/ecore_wayland/ecore_wl_input.c +++ b/src/lib/ecore_wayland/ecore_wl_input.c @@ -911,6 +911,7 @@ _ecore_wl_input_cb_touch_down(void *data, struct wl_touch *touch EINA_UNUSED, un input->display->serial = serial; input->sx = wl_fixed_to_int(x); input->sy = wl_fixed_to_int(y); + _ecore_wl_input_mouse_move_send(input, input->pointer_focus, timestamp, id); _ecore_wl_input_cb_pointer_enter(data, NULL, serial, surface, x, y); _ecore_wl_input_mouse_down_send(input, input->pointer_focus, id, BTN_LEFT, timestamp); diff --git a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c index 64cc8244c7..d4a60a501f 100644 --- a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c +++ b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c @@ -95,6 +95,10 @@ _ecore_evas_wl_common_cb_mouse_in(void *data EINA_UNUSED, int type EINA_UNUSED, if ((!ee) || (ee->ignore_events)) return ECORE_CALLBACK_PASS_ON; if (ev->window != ee->prop.window) return ECORE_CALLBACK_PASS_ON; if (ee->func.fn_mouse_in) ee->func.fn_mouse_in(ee); + + if (ee->in) + return ECORE_CALLBACK_PASS_ON; + ecore_event_evas_modifier_lock_update(ee->evas, ev->modifiers); evas_event_feed_mouse_in(ee->evas, ev->timestamp, NULL); _ecore_evas_mouse_move_process(ee, ev->x, ev->y, ev->timestamp);