From 579331403e2ae77e108fc34ea12a00a93548f968 Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Tue, 1 Apr 2014 17:29:36 +0900 Subject: [PATCH] hover - fix bug that happens as a result of fixing window obj position to fix a window position bug, window had to track actual geometry and not alwasy be at 0,0. but this means hover, that is getting geometry of the win object sometimes to figure out hover coverage area, and thus now x, y are not 0, 0 anymore... --- legacy/elementary/src/lib/elm_hover.c | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/legacy/elementary/src/lib/elm_hover.c b/legacy/elementary/src/lib/elm_hover.c index 2377c59b2d..3972667ad2 100644 --- a/legacy/elementary/src/lib/elm_hover.c +++ b/legacy/elementary/src/lib/elm_hover.c @@ -128,7 +128,15 @@ _elm_hover_left_space_calc(Elm_Hover_Data *sd, { Evas_Coord x = 0, y = 0, w = 0, h = 0, x2 = 0, y2 = 0, w2 = 0, h2 = 0; - if (sd->parent) evas_object_geometry_get(sd->parent, &x, &y, &w, &h); + if (sd->parent) + { + evas_object_geometry_get(sd->parent, &x, &y, &w, &h); + if (eo_isa(sd->parent, ELM_OBJ_WIN_CLASS)) + { + x = 0; + y = 0; + } + } if (sd->target) evas_object_geometry_get(sd->target, &x2, &y2, &w2, &h2); *spc_l = x2 - x; @@ -302,7 +310,15 @@ _elm_hover_elm_layout_sizing_eval(Eo *obj, Elm_Hover_Data *sd) if (sd->on_del) return; - if (sd->parent) evas_object_geometry_get(sd->parent, &x, &y, &w, &h); + if (sd->parent) + { + evas_object_geometry_get(sd->parent, &x, &y, &w, &h); + if (eo_isa(sd->parent, ELM_OBJ_WIN_CLASS)) + { + x = 0; + y = 0; + } + } evas_object_geometry_get(obj, &x2, &y2, &w2, &h2); if (elm_widget_mirrored_get(obj)) ofs_x = w - (x2 - x) - w2;