oops.. -_-;;

the changes is as below.

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



On Mon, Sep 2, 2013 at 1:21 PM, Kim Shinwoo <[email protected]> wrote:

> dear all, hello.
>
> you could get the below changes from commit
> 6113a3b76779db10de627b129464f1cbcf614a50.
> if you have any doubts or opinions, please let me know. thank you.
>
> diff --git a/src/lib/ecore_input_evas/ecore_input_evas.c
> b/src/lib/ecore_input_evas/ecore_input_evas.c
> index ef08c48..8669226 100644
> --- a/src/lib/ecore_input_evas/ecore_input_evas.c
> +++ b/src/lib/ecore_input_evas/ecore_input_evas.c
> @@ -341,7 +341,6 @@ _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;
>
> @@ -353,15 +352,11 @@
> _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)
> -          {
> -             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 ((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;
> +        }
>       }
>
> cordially,
> shinwoo kim.
>
>
> On Thu, Aug 29, 2013 at 9:39 PM, Kim Shinwoo <[email protected]>wrote:
>
>> to meet previous condition
>> the following would be better than before.
>> please let me know your opinion. thank you.
>>
>> diff --git a/src/lib/ecore_input_evas/ecore_input_evas.c
>> b/src/lib/ecore_input_evas/ecore_input_evas.c
>> index 8669226..dc5019e 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) && (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);
>>
>>
>> cordially
>> shinwoo kim.
>>
>>
>> On Thu, Aug 29, 2013 at 9:35 PM, Kim Shinwoo <[email protected]>wrote:
>>
>>> deal all, hello.
>>>
>>> the following would be proper error handling.
>>> previous lines just check whether the Ecore_Event_Last exists or not.
>>> if there is Ecore_Event_Last, then error handling lines should check the
>>> state.
>>> please check the following lines and give your opinion. thank you.
>>>
>>> diff --git a/src/lib/ecore_input_evas/ecore_input_evas.c
>>> b/src/lib/ecore_input_evas/ecore_input_evas.c
>>> index 8669226..124e5dd 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);
>>>
>>>
>>> cordially,
>>> shinwoo kim.
>>>
>>>
>>
>
------------------------------------------------------------------------------
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
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to