From c81c6002d69f2856f4d2c91ecc211282ec05d249 Mon Sep 17 00:00:00 2001 From: Marcel Hollerbach Date: Fri, 25 Oct 2019 14:04:46 -0400 Subject: [PATCH] elm_interface_scrollable: correctly handle bouncing Summary: if bounding is enabled, those values can get smaller and bigger than the max value. ref T4918 Depends on D9906 Reviewers: zmike Reviewed By: zmike Subscribers: cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T4918 Differential Revision: https://phab.enlightenment.org/D9907 --- src/lib/elementary/elm_interface_scrollable.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lib/elementary/elm_interface_scrollable.c b/src/lib/elementary/elm_interface_scrollable.c index cab7dc2..18cc4af 100644 --- a/src/lib/elementary/elm_interface_scrollable.c +++ b/src/lib/elementary/elm_interface_scrollable.c @@ -498,10 +498,10 @@ _elm_direction_arrows_eval(Elm_Scrollable_Smart_Interface_Data *sid) elm_obj_pan_pos_min_get(sid->pan_obj, &minx, &miny); elm_obj_pan_pos_get(sid->pan_obj, &x, &y); - if (x == minx) go_left = EINA_FALSE; - if (x == (mx + minx)) go_right = EINA_FALSE; - if (y == miny) go_up = EINA_FALSE; - if (y == (my + miny)) go_down = EINA_FALSE; + if (x <= minx) go_left = EINA_FALSE; + if (x >= (mx + minx)) go_right = EINA_FALSE; + if (y <= miny) go_up = EINA_FALSE; + if (y >= (my + miny)) go_down = EINA_FALSE; if (go_left != sid->go_left) { if (go_left) -- 2.7.4