From 73f58db6cc9f222e2fa221648204fcdd8604d0f9 Mon Sep 17 00:00:00 2001 From: Daniel Juyung Seo Date: Fri, 29 Mar 2013 21:29:24 +0900 Subject: [PATCH] ctxpopup: Fixed ctxpopup geometry when parent is an elm_win. Forwardport from elementary-1.7. This is manual cherry-pick from discomfitor's elementary-1.7 patch due to the code base difference. --- legacy/elementary/ChangeLog | 3 +++ legacy/elementary/NEWS | 1 + legacy/elementary/src/lib/elc_ctxpopup.c | 4 ++++ 3 files changed, 8 insertions(+) diff --git a/legacy/elementary/ChangeLog b/legacy/elementary/ChangeLog index 5422c44..9e2c00e 100644 --- a/legacy/elementary/ChangeLog +++ b/legacy/elementary/ChangeLog @@ -1187,3 +1187,6 @@ * Map supports "language,changed" smart callback. +2013-03-29 Mike Blumenkrantz + + * Fix ctxpopup geometry when parent is an elm_win. diff --git a/legacy/elementary/NEWS b/legacy/elementary/NEWS index 04aa4b0..a51ca6a 100644 --- a/legacy/elementary/NEWS +++ b/legacy/elementary/NEWS @@ -193,6 +193,7 @@ Fixes: * Focus highlight should be reconfigured when theme is changed. * Fix the elm_shutdown bug in _elm_shutdown_config. * Fix box layout bug when items with max size force sizes below minimum. + * Fix ctxpopup geometry when parent is an elm_win. Removals: diff --git a/legacy/elementary/src/lib/elc_ctxpopup.c b/legacy/elementary/src/lib/elc_ctxpopup.c index a1e79c0..d67a894 100644 --- a/legacy/elementary/src/lib/elc_ctxpopup.c +++ b/legacy/elementary/src/lib/elc_ctxpopup.c @@ -164,6 +164,8 @@ _base_geometry_calc(Evas_Object *obj, evas_object_geometry_get (sd->parent, &hover_area.x, &hover_area.y, &hover_area.w, &hover_area.h); + if (!strcmp(evas_object_type_get(sd->parent), "elm_win")) + hover_area.x = hover_area.y = 0; evas_object_geometry_get(obj, &pos.x, &pos.y, NULL, NULL); @@ -1186,6 +1188,8 @@ _hover_parent_set(Eo *obj, void *_pd, va_list *list) //Update Background evas_object_geometry_get(parent, &x, &y, &w, &h); + if (!strcmp(evas_object_type_get(parent), "elm_win")) + x = y = 0; evas_object_move(sd->bg, x, y); evas_object_resize(sd->bg, w, h); -- 2.7.4