summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaeun Choi <jaeun12.choi@samsung.com>2018-01-16 14:57:38 +0900
committerJaeun Choi <jaeun12.choi@samsung.com>2018-01-16 14:57:38 +0900
commitd36c849e2003aaa54432b74bcabe9f838d992a36 (patch)
tree7faea460f5f74c58839ef9b9465960167ec61fe7
parent4f2b04c7a2a1fbcdae87fe6cdd15cf3f31384f3e (diff)
elm_panel: add exception handling in _drawer_close()
this fixes a bug with scrollable panel not being blocked when it is closed. scroll is blocked in _anim_stop_cb() which is called after elm_interface_scrollable_region_bring_in(). but if panel content is already at the target position, _anim_stop_cb() is not called. so there is a need to check content's position and handle the exceptional case.
-rw-r--r--src/lib/elementary/elm_panel.c21
1 files changed, 20 insertions, 1 deletions
diff --git a/src/lib/elementary/elm_panel.c b/src/lib/elementary/elm_panel.c
index 1ccf497193..0d89df0f90 100644
--- a/src/lib/elementary/elm_panel.c
+++ b/src/lib/elementary/elm_panel.c
@@ -343,7 +343,7 @@ static void
343_drawer_close(Evas_Object *obj, Evas_Coord w, Evas_Coord h, Eina_Bool anim) 343_drawer_close(Evas_Object *obj, Evas_Coord w, Evas_Coord h, Eina_Bool anim)
344{ 344{
345 ELM_PANEL_DATA_GET(obj, sd); 345 ELM_PANEL_DATA_GET(obj, sd);
346 int x = 0, y = 0; 346 int x = 0, y = 0, cx, cy;
347 Eina_Bool horizontal = EINA_FALSE; 347 Eina_Bool horizontal = EINA_FALSE;
348 348
349 elm_widget_tree_unfocusable_set(obj, EINA_TRUE); 349 elm_widget_tree_unfocusable_set(obj, EINA_TRUE);
@@ -369,6 +369,25 @@ _drawer_close(Evas_Object *obj, Evas_Coord w, Evas_Coord h, Eina_Bool anim)
369 break; 369 break;
370 } 370 }
371 371
372 elm_interface_scrollable_content_pos_get(obj, &cx, &cy);
373
374 if ((x == cx) && (y == cy))
375 {
376 if (!sd->freeze)
377 {
378 if (horizontal)
379 elm_interface_scrollable_movement_block_set
380 (obj, EFL_UI_SCROLL_BLOCK_HORIZONTAL);
381 else
382 elm_interface_scrollable_movement_block_set
383 (obj, EFL_UI_SCROLL_BLOCK_VERTICAL);
384 sd->freeze = EINA_TRUE;
385 elm_layout_signal_emit(sd->scr_ly, "elm,state,content,hidden", "elm");
386 }
387
388 return;
389 }
390
372 if (anim) 391 if (anim)
373 { 392 {
374 if (sd->freeze) 393 if (sd->freeze)