elm scrollable: return correct values from post event callbacks 23/117023/2
authorAmitesh Singh <amitesh.sh@samsung.com>
Sat, 21 Jan 2017 10:01:50 +0000 (15:31 +0530)
committerGerrit Code Review <gerrit@review.vlan103.tizen.org>
Tue, 7 Mar 2017 01:11:54 +0000 (17:11 -0800)
This fixes a small bug in my old patch 248b6beeee1e238

commit f1163107574a150cda7d1ef5e34f005e58b9680d
Author: Mike Blumenkrantz <zmike@osg.samsung.com>
Date:   Thu Nov 3 11:42:26 2016 -0400

   elm scrollable: return correct values from post event callbacks

   post event callbacks must return 0 to stop processing when an event is
   consumed, and 1 when processing should continue. this is the only place in
   all of efl which used this functionality, and it did so incorrectly.

   @fix

   ref 248b6beeee1e2387176e3abec7176e916175f12a
   ref D2393

Change-Id: I943779d2a005637e470f9fc40d9cb15782b14b20
Signed-off-by: Amitesh Singh <amitesh.sh@samsung.com>
src/lib/elm_interface_scrollable.c

index fc2decc..da1e74f 100644 (file)
@@ -1925,7 +1925,7 @@ _scroll_wheel_post_event_cb(void *data, Evas *e EINA_UNUSED)
    pwx = sid->wx;
    pwy = sid->wy;
 
-   if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return EINA_FALSE;
+   if (ev->event_flags & EVAS_EVENT_FLAG_ON_HOLD) return EINA_TRUE;
    if (evas_key_modifier_is_set(ev->modifiers, "Shift"))
      direction = !direction;
 
@@ -2050,7 +2050,7 @@ _scroll_wheel_post_event_cb(void *data, Evas *e EINA_UNUSED)
         sid->down.last_time_y_wheel = t;
      }
 
-   return EINA_TRUE;
+   return EINA_FALSE;
 }
 
 static void
@@ -2101,7 +2101,7 @@ _elm_scroll_post_event_up(void *data,
              elm_widget_drag_lock_y_set(sid->obj, EINA_FALSE);
           }
      }
-   return EINA_TRUE;
+   return EINA_FALSE;
 }
 
 static Eina_Bool
@@ -3073,7 +3073,7 @@ _elm_scroll_post_event_move(void *data,
      }
    if (start) _elm_scroll_drag_start(sid);
 
-   return EINA_TRUE;
+   return EINA_FALSE;
 }