ctxpopup: Fixed ctxpopup geometry when parent is an elm_win. Forwardport from element...
authorDaniel Juyung Seo <seojuyung2@gmail.com>
Fri, 29 Mar 2013 12:29:24 +0000 (21:29 +0900)
committerDaniel Juyung Seo <seojuyung2@gmail.com>
Fri, 29 Mar 2013 12:29:24 +0000 (21:29 +0900)
This is manual cherry-pick from discomfitor's elementary-1.7 patch due to the code base difference.

ChangeLog
NEWS
src/lib/elc_ctxpopup.c

index 5422c44..9e2c00e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
 
         * Map supports "language,changed" smart callback.
 
+2013-03-29  Mike Blumenkrantz
+
+        * Fix ctxpopup geometry when parent is an elm_win.
diff --git a/NEWS b/NEWS
index 04aa4b0..a51ca6a 100644 (file)
--- a/NEWS
+++ b/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:
 
index a1e79c0..d67a894 100644 (file)
@@ -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);