summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/lib/ecore_input_evas/ecore_input_evas.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/lib/ecore_input_evas/ecore_input_evas.c b/src/lib/ecore_input_evas/ecore_input_evas.c
index bd2f0d1868..3c99dc48ed 100644
--- a/src/lib/ecore_input_evas/ecore_input_evas.c
+++ b/src/lib/ecore_input_evas/ecore_input_evas.c
@@ -133,7 +133,10 @@ _ecore_event_evas_lookup(Evas_Device *evas_device, unsigned int device,
133 //the number of last event is small, simple check is ok. 133 //the number of last event is small, simple check is ok.
134 EINA_LIST_FOREACH(_last_events, l, eel) 134 EINA_LIST_FOREACH(_last_events, l, eel)
135 if ((eel->device == device) && (eel->buttons == buttons) && (eel->evas_device == evas_device)) 135 if ((eel->device == device) && (eel->buttons == buttons) && (eel->evas_device == evas_device))
136 return eel; 136 {
137 _last_events = eina_list_promote_list(_last_events, l);
138 return eel;
139 }
137 if (!create_new) return NULL; 140 if (!create_new) return NULL;
138 eel = malloc(sizeof (Ecore_Event_Last)); 141 eel = malloc(sizeof (Ecore_Event_Last));
139 if (!eel) return NULL; 142 if (!eel) return NULL;
@@ -147,7 +150,7 @@ _ecore_event_evas_lookup(Evas_Device *evas_device, unsigned int device,
147 eel->win = win; 150 eel->win = win;
148 eel->evas_device = evas_device; 151 eel->evas_device = evas_device;
149 152
150 _last_events = eina_list_append(_last_events, eel); 153 _last_events = eina_list_prepend(_last_events, eel);
151 return eel; 154 return eel;
152} 155}
153 156
@@ -670,6 +673,8 @@ _ecore_event_evas_mouse_io(Ecore_Event_Mouse_IO *e, Ecore_Event_IO io)
670{ 673{
671 Ecore_Input_Window *lookup; 674 Ecore_Input_Window *lookup;
672 Eo *seat; 675 Eo *seat;
676 Eina_List *l;
677 Ecore_Event_Last *eel;
673 678
674 lookup = _ecore_event_window_match(e->event_window); 679 lookup = _ecore_event_window_match(e->event_window);
675 if (!lookup) return ECORE_CALLBACK_PASS_ON; 680 if (!lookup) return ECORE_CALLBACK_PASS_ON;
@@ -696,6 +701,15 @@ _ecore_event_evas_mouse_io(Ecore_Event_Mouse_IO *e, Ecore_Event_IO io)
696 break; 701 break;
697 } 702 }
698 703
704 /* check whether we have a multi-touch press event here */
705 EINA_LIST_FOREACH(_last_events, l, eel)
706 {
707 if ((eel->state == ECORE_INPUT_DOWN) && eel->device)
708 return ECORE_CALLBACK_PASS_ON;
709 if (eel->state != ECORE_INPUT_DOWN) break;
710 }
711 /* a multi-touch event sequence will emit move events normally along with
712 * accurate device info, so we have no need to do anything here */
699 lookup->move_mouse(lookup->window, e->x, e->y, e->timestamp); 713 lookup->move_mouse(lookup->window, e->x, e->y, e->timestamp);
700 return ECORE_CALLBACK_PASS_ON; 714 return ECORE_CALLBACK_PASS_ON;
701} 715}