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.
This commit is contained in:
Rafael Antognolli 2013-05-08 14:01:23 -03:00
parent 2ec4078456
commit 2a20ca4477
2 changed files with 5 additions and 0 deletions

View File

@ -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);

View File

@ -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);