summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2017-04-12 15:02:42 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2017-04-12 15:18:24 +0900
commit0cd610af20799cce37ec0f93ad451d328ef0455f (patch)
tree292d140cbd57ed017c60308f72d7b79a85f12775
parent59cf7c7ab756cda78dfca44305e24d8915cf61c0 (diff)
scroller: Fix freeze after dragging bars
The freeze property is a set() only but could internally be reset to false, after dragging a vertical or horizontal slider. Test scenario: elementary_test -to scroller Click Freeze, test the mouse wheel (can't do anything), drag a scroller side bar, test the mouse wheel again. Before this patch, the scroller would scroll. After the patch, the scroller remains fixed, respecting the value of freeze. FIXME: It is possible that the proper fix would be to disable bars drag during freeze, but that is not the case currently. NOTE: freeze, hold, movement_block, lock_x/y have very similar meanings. The doc really needs clarification here, and some property might be removed. Also, freeze and hold have no getter, only a setter. drag_lock_x/y is part of elm_widget, and not specific to scrollers.
-rw-r--r--src/lib/elementary/elm_interface_scrollable.c5
-rw-r--r--src/lib/elementary/elm_interface_scrollable.h1
2 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/elementary/elm_interface_scrollable.c b/src/lib/elementary/elm_interface_scrollable.c
index 2335107f26..9c05d2f2bd 100644
--- a/src/lib/elementary/elm_interface_scrollable.c
+++ b/src/lib/elementary/elm_interface_scrollable.c
@@ -1088,7 +1088,7 @@ _elm_scroll_edje_drag_v_stop_cb(void *data,
1088 1088
1089 _elm_scroll_scroll_bar_read_and_update(sid); 1089 _elm_scroll_scroll_bar_read_and_update(sid);
1090 _elm_scroll_drag_stop(sid); 1090 _elm_scroll_drag_stop(sid);
1091 sid->freeze = EINA_FALSE; 1091 sid->freeze = sid->freeze_want;
1092} 1092}
1093 1093
1094static void 1094static void
@@ -1163,7 +1163,7 @@ _elm_scroll_edje_drag_h_stop_cb(void *data,
1163 1163
1164 _elm_scroll_scroll_bar_read_and_update(sid); 1164 _elm_scroll_scroll_bar_read_and_update(sid);
1165 _elm_scroll_drag_stop(sid); 1165 _elm_scroll_drag_stop(sid);
1166 sid->freeze = EINA_FALSE; 1166 sid->freeze = sid->freeze_want;
1167} 1167}
1168 1168
1169static void 1169static void
@@ -4259,6 +4259,7 @@ EOLIAN static void
4259_elm_interface_scrollable_freeze_set(Eo *obj EINA_UNUSED, Elm_Scrollable_Smart_Interface_Data *sid, Eina_Bool freeze) 4259_elm_interface_scrollable_freeze_set(Eo *obj EINA_UNUSED, Elm_Scrollable_Smart_Interface_Data *sid, Eina_Bool freeze)
4260{ 4260{
4261 sid->freeze = freeze; 4261 sid->freeze = freeze;
4262 sid->freeze_want = freeze;
4262 if (sid->freeze) 4263 if (sid->freeze)
4263 { 4264 {
4264 if (sid->down.onhold_animator) 4265 if (sid->down.onhold_animator)
diff --git a/src/lib/elementary/elm_interface_scrollable.h b/src/lib/elementary/elm_interface_scrollable.h
index 624c92199a..25245ecf70 100644
--- a/src/lib/elementary/elm_interface_scrollable.h
+++ b/src/lib/elementary/elm_interface_scrollable.h
@@ -227,6 +227,7 @@ struct _Elm_Scrollable_Smart_Interface_Data
227 Eina_Bool bouncemey : 1; 227 Eina_Bool bouncemey : 1;
228 Eina_Bool bouncemex : 1; 228 Eina_Bool bouncemex : 1;
229 Eina_Bool freeze : 1; 229 Eina_Bool freeze : 1;
230 Eina_Bool freeze_want : 1;
230 Eina_Bool hold : 1; 231 Eina_Bool hold : 1;
231 Eina_Bool min_w : 1; 232 Eina_Bool min_w : 1;
232 Eina_Bool min_h : 1; 233 Eina_Bool min_h : 1;