kimcinoo pushed a commit to branch master.
commit 6113a3b76779db10de627b129464f1cbcf614a50
Author: Shinwoo Kim <[email protected]>
Date: Mon Sep 2 11:51:08 2013 +0900
[ecore_input_evas] check the state of last mouse event more properly.
---
ChangeLog | 4 ++++
NEWS | 1 +
src/lib/ecore_input_evas/ecore_input_evas.c | 15 ++++++++++-----
3 files changed, 15 insertions(+), 5 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 1e883c8..85dcb18 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2013-09-02 Shinwoo Kim
+
+ * Ecore_Input_Evas: Check the state of last mouse event more properly.
+
2013-08-29 Boris Faure
* Edje: export EFL_VERSION_MAJOR/MINOR when compiling edc files
diff --git a/NEWS b/NEWS
index 088067c..df5af76 100644
--- a/NEWS
+++ b/NEWS
@@ -372,6 +372,7 @@ Fixes:
- Fix return type of function ecore_wl_outputs_get().
* Ecore_Input_Evas:
- Fix ecore_input_evas didn't check the device id of mouse event.
+ - Check the state of last mouse event more properly.
* Ecore-imf:
- Fix crash when ecore_imf_context_del is called in
ecore_imf_context_input_panel_callback_call.
* Eio:
diff --git a/src/lib/ecore_input_evas/ecore_input_evas.c
b/src/lib/ecore_input_evas/ecore_input_evas.c
index 8669226..ef08c48 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)
static Eina_Bool
_ecore_event_evas_mouse_button(Ecore_Event_Mouse_Button *e, Ecore_Event_Press
press, Eina_Bool faked)
{
+ Ecore_Event_Last *eel;
Ecore_Input_Window *lookup;
Evas_Button_Flags flags = EVAS_BUTTON_NONE;
@@ -352,11 +353,15 @@ _ecore_event_evas_mouse_button(Ecore_Event_Mouse_Button
*e, Ecore_Event_Press pr
if (_last_events_enable)
{
//error handle: if ecore up without ecore down
- if ((press == ECORE_UP) && (!_ecore_event_evas_lookup(e->multi.device,
e->buttons, EINA_FALSE)))
- {
- INF("ButtonEvent: up event without down event.");
- return ECORE_CALLBACK_PASS_ON;
- }
+ if (press == ECORE_UP)
+ {
+ eel = _ecore_event_evas_lookup(e->multi.device, e->buttons,
EINA_FALSE);
+ if ((!eel) || (eel->state == ECORE_INPUT_UP))
+ {
+ INF("ButtonEvent: up event without down event.");
+ return ECORE_CALLBACK_PASS_ON;
+ }
+ }
}
if (!faked) _ecore_event_evas_push_mouse_button(e, press);
--
------------------------------------------------------------------------------
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk