discomfitor pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=e4d11e2e4fd6a1e2a74da2129278ca3bd542046b

commit e4d11e2e4fd6a1e2a74da2129278ca3bd542046b
Author: Mike Blumenkrantz <zm...@osg.samsung.com>
Date:   Tue Dec 22 16:06:30 2015 -0500

    evas: unset pointer ungrabs when using 
EVAS_OBJECT_POINTER_MODE_NOGRAB_NO_REPEAT_UPDOWN
    
    I have no idea what this mode was intended to do since there are no docs
    and the related code in evas events is undocumented, so I can only 
speculate.
    
    what I can say for certain is that this mode does grab, in opposition to 
its name,
    and that until this commit any object which sets this pointer mode will
    permanently break mouse eventing on the canvas
    
    ref evas SVN 67264
    
    @fix
---
 src/lib/evas/canvas/evas_events.c | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/src/lib/evas/canvas/evas_events.c 
b/src/lib/evas/canvas/evas_events.c
index c60526f..3089cf0 100644
--- a/src/lib/evas/canvas/evas_events.c
+++ b/src/lib/evas/canvas/evas_events.c
@@ -459,7 +459,8 @@ _evas_event_source_mouse_up_events(Evas_Object *eo_obj, 
Evas *eo_e, Evas_Event_M
      {
         if (src->delete_me) return;
         child = eo_data_scope_get(eo_child, EVAS_OBJECT_CLASS);
-        if ((child->pointer_mode == EVAS_OBJECT_POINTER_MODE_AUTOGRAB) &&
+        if (((child->pointer_mode == EVAS_OBJECT_POINTER_MODE_AUTOGRAB) ||
+             (child->pointer_mode == 
EVAS_OBJECT_POINTER_MODE_NOGRAB_NO_REPEAT_UPDOWN)) ||
             (child->mouse_grabbed > 0))
           {
              child->mouse_grabbed--;
@@ -620,7 +621,8 @@ _evas_event_source_multi_up_events(Evas_Object *eo_obj, 
Evas *eo_e, Evas_Event_M
      {
         ev->canvas = point;
         child = eo_data_scope_get(eo_child, EVAS_OBJECT_CLASS);
-        if ((child->pointer_mode != EVAS_OBJECT_POINTER_MODE_NOGRAB) &&
+        if (((child->pointer_mode == EVAS_OBJECT_POINTER_MODE_AUTOGRAB) ||
+             (child->pointer_mode == 
EVAS_OBJECT_POINTER_MODE_NOGRAB_NO_REPEAT_UPDOWN)) ||
             (child->mouse_grabbed > 0))
           {
              child->mouse_grabbed--;
@@ -1274,7 +1276,8 @@ _evas_canvas_event_feed_mouse_up(Eo *eo_e, 
Evas_Public_Data *e, int b, Evas_Butt
         EINA_LIST_FOREACH(copy, l, eo_obj)
           {
              Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, 
EVAS_OBJECT_CLASS);
-             if ((obj->pointer_mode == EVAS_OBJECT_POINTER_MODE_AUTOGRAB) &&
+             if (((obj->pointer_mode == EVAS_OBJECT_POINTER_MODE_AUTOGRAB) ||
+                 (obj->pointer_mode == 
EVAS_OBJECT_POINTER_MODE_NOGRAB_NO_REPEAT_UPDOWN)) &&
                  (obj->mouse_grabbed > 0))
                {
                   obj->mouse_grabbed--;
@@ -2217,7 +2220,8 @@ _canvas_event_feed_multi_up_internal(Evas *eo_e, void 
*_pd,
           ev.canvas.xsub = ev.canvas.x; // fixme - lost precision
         if (y != ev.canvas.y)
           ev.canvas.ysub = ev.canvas.y; // fixme - lost precision
-        if ((obj->pointer_mode != EVAS_OBJECT_POINTER_MODE_NOGRAB) &&
+        if (((obj->pointer_mode == EVAS_OBJECT_POINTER_MODE_AUTOGRAB) ||
+            (obj->pointer_mode == 
EVAS_OBJECT_POINTER_MODE_NOGRAB_NO_REPEAT_UPDOWN)) &&
             (obj->mouse_grabbed > 0))
           {
              obj->mouse_grabbed--;

-- 


Reply via email to