seoz pushed a commit to branch master.

commit 9c3d78b3e8deaaa12eecbd081369a7a1d3924c59
Author: Daniel Juyung Seo <[email protected]>
Date:   Fri Mar 29 21:29:24 2013 +0900

    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.
---
 ChangeLog              | 3 +++
 NEWS                   | 1 +
 src/lib/elc_ctxpopup.c | 4 ++++
 3 files changed, 8 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index 5422c44..9e2c00e 100644
--- a/ChangeLog
+++ b/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/NEWS b/NEWS
index 04aa4b0..a51ca6a 100644
--- 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:
 
diff --git a/src/lib/elc_ctxpopup.c b/src/lib/elc_ctxpopup.c
index a1e79c0..d67a894 100644
--- a/src/lib/elc_ctxpopup.c
+++ b/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);
 

-- 

------------------------------------------------------------------------------
Own the Future-Intel(R) Level Up Game Demo Contest 2013
Rise to greatness in Intel's independent game demo contest. Compete 
for recognition, cash, and the chance to get your game on Steam. 
$5K grand prize plus 10 genre and skill prizes. Submit your demo 
by 6/6/13. http://altfarm.mediaplex.com/ad/ck/12124-176961-30367-2

Reply via email to