From 8b76f22a7eb5dbe6ba9f52c0b4ddc5315972f23a Mon Sep 17 00:00:00 2001 From: Carsten Haitzler Date: Mon, 6 Aug 2012 06:43:59 +0000 Subject: [PATCH] big tooltip (tooltip in window) visibility bug fix! yay! :) SVN revision: 74897 --- legacy/elementary/src/lib/els_tooltip.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/legacy/elementary/src/lib/els_tooltip.c b/legacy/elementary/src/lib/els_tooltip.c index a7da1f69c1..a2e18a30c5 100644 --- a/legacy/elementary/src/lib/els_tooltip.c +++ b/legacy/elementary/src/lib/els_tooltip.c @@ -132,22 +132,19 @@ _elm_tooltip_show(Elm_Tooltip *tt) if (tt->free_size) { tt->tt_win = elm_win_add(NULL, "tooltip", ELM_WIN_BASIC); - elm_win_borderless_set(tt->tt_win, EINA_TRUE); elm_win_override_set(tt->tt_win, EINA_TRUE); tt->tt_evas = evas_object_evas_get(tt->tt_win); tt->tooltip = edje_object_add(tt->tt_evas); - evas_object_move(tt->tooltip, 0, 0); + evas_object_size_hint_weight_set(tt->tooltip, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); + evas_object_size_hint_align_set(tt->tooltip, EVAS_HINT_FILL, EVAS_HINT_FILL); elm_win_resize_object_add(tt->tt_win, tt->tooltip); -#ifdef HAVE_ELEMENTARY_X - ecore_x_window_shape_input_rectangle_set(elm_win_xwindow_get(tt->tt_win), 0, 0, 0, 0); -#endif - evas_object_show(tt->tt_win); } else tt->tooltip = edje_object_add(tt->evas); if (!tt->tooltip) return; - evas_object_layer_set(tt->tt_win ?: tt->tooltip, ELM_OBJECT_LAYER_TOOLTIP); + if (tt->free_size) + evas_object_layer_set(tt->tooltip, ELM_OBJECT_LAYER_TOOLTIP); evas_object_event_callback_add (tt->eventarea, EVAS_CALLBACK_MOVE, _elm_tooltip_obj_move_cb, tt); @@ -303,11 +300,21 @@ _elm_tooltip_reconfigure(Elm_Tooltip *tt) { /* FIXME: hardcoded here is bad */ if (str && (!strcmp(str, "enabled"))) { + evas_object_hide(tt->tt_win); elm_win_alpha_set(tt->tt_win, EINA_TRUE); +#ifdef HAVE_ELEMENTARY_X + ecore_x_window_shape_input_rectangle_set(elm_win_xwindow_get(tt->tt_win), 0, 0, 0, 0); +#endif + evas_object_show(tt->tt_win); } else { + evas_object_hide(tt->tt_win); elm_win_alpha_set(tt->tt_win, EINA_FALSE); +#ifdef HAVE_ELEMENTARY_X + ecore_x_window_shape_input_rectangle_set(elm_win_xwindow_get(tt->tt_win), 0, 0, 0, 0); +#endif + evas_object_show(tt->tt_win); } }