raster pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=0305bd4e1108064b7aa3d25ec0a2580d3e556bdb
commit 0305bd4e1108064b7aa3d25ec0a2580d3e556bdb Author: Shinwoo Kim <cinoo....@samsung.com> Date: Thu Feb 5 20:02:24 2015 +0900 [tooltip] use proper object to set tooltip layer Summary: tooltip could be hide by the other object which have lower layer than target object of tooltip. the layer of content could be changed, when is set to the tooltip as a content. @fix Test Plan: check added test lines Reviewers: cedric, jpeg, seoz, raster Reviewed By: raster Subscribers: singh.amitesh, stefan_schmidt, seoz Differential Revision: https://phab.enlightenment.org/D1889 --- src/bin/test.c | 2 ++ src/bin/test_tooltip.c | 28 ++++++++++++++++++++++++++++ src/lib/els_tooltip.c | 3 ++- 3 files changed, 32 insertions(+), 1 deletion(-) diff --git a/src/bin/test.c b/src/bin/test.c index 731fc49..4d98693 100644 --- a/src/bin/test.c +++ b/src/bin/test.c @@ -191,6 +191,7 @@ void test_launcher3(void *data, Evas_Object *obj, void *event_info); void test_anim(void *data, Evas_Object *obj, void *event_info); void test_tooltip(void *data, Evas_Object *obj, void *event_info); void test_tooltip2(void *data, Evas_Object *obj, void *event_info); +void test_tooltip3(void *data, Evas_Object *obj, void *event_info); void test_cursor(void *data, Evas_Object *obj, void *event_info); void test_cursor2(void *data, Evas_Object *obj, void *event_info); void test_cursor3(void *data, Evas_Object *obj, void *event_info); @@ -761,6 +762,7 @@ add_tests: ADD_TEST(NULL, "Popups", "Notify", test_notify); ADD_TEST(NULL, "Popups", "Tooltip", test_tooltip); ADD_TEST(NULL, "Popups", "Tooltip 2", test_tooltip2); + ADD_TEST(NULL, "Popups", "Tooltip 3", test_tooltip3); ADD_TEST(NULL, "Popups", "Popup", test_popup); //------------------------------// diff --git a/src/bin/test_tooltip.c b/src/bin/test_tooltip.c index 5d70380..2329067 100644 --- a/src/bin/test_tooltip.c +++ b/src/bin/test_tooltip.c @@ -715,3 +715,31 @@ test_tooltip2(void *data EINA_UNUSED, evas_object_resize(win, 320, 480); evas_object_show(win); } + +void +test_tooltip3(void *data EINA_UNUSED, + Evas_Object *obj EINA_UNUSED, + void *event_info EINA_UNUSED) +{ + Evas_Object *win, *bt, *rect; + + win = elm_win_util_standard_add("tooltip3", "Tooltip 3"); + elm_win_autodel_set(win, EINA_TRUE); + + bt = elm_button_add(win); + elm_object_text_set(bt, "I have layer 200, below rect has layer 100."); + elm_object_tooltip_text_set(bt, "Can you see me?"); + evas_object_resize(bt, 250, 30); + evas_object_move(bt, 25, 135); + evas_object_layer_set(bt, 200); + evas_object_show(bt); + + rect = evas_object_rectangle_add(evas_object_evas_get(bt)); + evas_object_resize(rect, 150, 300); + evas_object_move(rect, 0, 0); + evas_object_show(rect); + evas_object_layer_set(rect, 100); + + evas_object_resize(win, 300, 300); + evas_object_show(win); +} diff --git a/src/lib/els_tooltip.c b/src/lib/els_tooltip.c index faaf30b..c938589 100644 --- a/src/lib/els_tooltip.c +++ b/src/lib/els_tooltip.c @@ -368,7 +368,6 @@ _elm_tooltip_reconfigure(Elm_Tooltip *tt) return; } evas_object_show(tt->content); - evas_object_layer_set(tt->content, ELM_OBJECT_LAYER_TOOLTIP); evas_object_pass_events_set(tt->content, EINA_TRUE); edje_object_part_swallow (tt->tooltip, "elm.swallow.content", tt->content); @@ -377,6 +376,8 @@ _elm_tooltip_reconfigure(Elm_Tooltip *tt) evas_object_event_callback_add(tt->content, EVAS_CALLBACK_DEL, _elm_tooltip_content_del_cb, tt); + /* tooltip has to use layer tooltip */ + evas_object_layer_set(tt->tooltip, ELM_OBJECT_LAYER_TOOLTIP); } TTDBG("*******RECALC\n"); evas_object_size_hint_min_get(tt->content, &ominw, &ominh); --