antognolli pushed a commit to branch master.

commit 2a20ca44775d1d8dbb39a61d4784390d4120d916
Author: Rafael Antognolli <[email protected]>
Date:   Wed May 8 14:01:23 2013 -0300

    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 +
 src/modules/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 b157bd0..0b7837b 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 64cc824..d4a60a5 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);

-- 

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and 
their applications. This 200-page book is written by three acclaimed 
leaders in the field. The early access version is available now. 
Download your free book today! http://p.sf.net/sfu/neotech_d2d_may

Reply via email to