summaryrefslogtreecommitdiff
path: root/src/lib/ecore_input_evas
diff options
context:
space:
mode:
authorShinwoo Kim <cinoo.kim@samsung.com>2013-09-02 11:51:08 +0900
committerShinwoo Kim <cinoo.kim@samsung.com>2013-09-02 11:52:50 +0900
commit6113a3b76779db10de627b129464f1cbcf614a50 (patch)
tree9f91bcedff1893d99cb69e2bb736bc3cbd574f75 /src/lib/ecore_input_evas
parent64823141f67b6198f3a7f4dcab6378983430b340 (diff)
[ecore_input_evas] check the state of last mouse event more properly.
Diffstat (limited to 'src/lib/ecore_input_evas')
-rw-r--r--src/lib/ecore_input_evas/ecore_input_evas.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/src/lib/ecore_input_evas/ecore_input_evas.c b/src/lib/ecore_input_evas/ecore_input_evas.c
index 8669226983..ef08c48c59 100644
--- a/src/lib/ecore_input_evas/ecore_input_evas.c
+++ b/src/lib/ecore_input_evas/ecore_input_evas.c
@@ -341,6 +341,7 @@ _ecore_event_evas_key(Ecore_Event_Key *e, Ecore_Event_Press press)
341static Eina_Bool 341static Eina_Bool
342_ecore_event_evas_mouse_button(Ecore_Event_Mouse_Button *e, Ecore_Event_Press press, Eina_Bool faked) 342_ecore_event_evas_mouse_button(Ecore_Event_Mouse_Button *e, Ecore_Event_Press press, Eina_Bool faked)
343{ 343{
344 Ecore_Event_Last *eel;
344 Ecore_Input_Window *lookup; 345 Ecore_Input_Window *lookup;
345 Evas_Button_Flags flags = EVAS_BUTTON_NONE; 346 Evas_Button_Flags flags = EVAS_BUTTON_NONE;
346 347
@@ -352,11 +353,15 @@ _ecore_event_evas_mouse_button(Ecore_Event_Mouse_Button *e, Ecore_Event_Press pr
352 if (_last_events_enable) 353 if (_last_events_enable)
353 { 354 {
354 //error handle: if ecore up without ecore down 355 //error handle: if ecore up without ecore down
355 if ((press == ECORE_UP) && (!_ecore_event_evas_lookup(e->multi.device, e->buttons, EINA_FALSE))) 356 if (press == ECORE_UP)
356 { 357 {
357 INF("ButtonEvent: up event without down event."); 358 eel = _ecore_event_evas_lookup(e->multi.device, e->buttons, EINA_FALSE);
358 return ECORE_CALLBACK_PASS_ON; 359 if ((!eel) || (eel->state == ECORE_INPUT_UP))
359 } 360 {
361 INF("ButtonEvent: up event without down event.");
362 return ECORE_CALLBACK_PASS_ON;
363 }
364 }
360 } 365 }
361 366
362 if (!faked) _ecore_event_evas_push_mouse_button(e, press); 367 if (!faked) _ecore_event_evas_push_mouse_button(e, press);