discomfitor pushed a commit to branch elementary-1.7.

commit 86a3b382fe2993fb86ac600cf8ac041a1a873f69
Author: discomfitor <[email protected]>
Date:   Wed Mar 27 18:47:35 2013 +0000

    fix ctxpopup geom when parent is elm_win
---
 ChangeLog              | 4 ++++
 NEWS                   | 1 +
 src/lib/elc_ctxpopup.c | 4 ++++
 3 files changed, 9 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index eec4abf..b35cc39 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -788,3 +788,7 @@
         * Fix the elm_shutdown bug in _elm_shutdown_config.
         When the elm_shutdown is used after elm_config_all_flush, the segment 
fault occur.
         It's why it uses ecore_x in _prop_all_update_cb after removing it.
+
+2013-03-27  Mike Blumenkrantz
+
+        * fix ctxpopup geometry when parent is an elm_win
diff --git a/NEWS b/NEWS
index fe6990b..1bf12bf 100644
--- a/NEWS
+++ b/NEWS
@@ -26,6 +26,7 @@ Fixes:
    * List : Focus_next should be executed only when access mode is enabled.
    * Focus highlight should be reconfigured when theme is changed.
    * Fix the elm_shutdown bug in _elm_shutdown_config.
+   * fix ctxpopup geometry when parent is an elm_win
         
 Elementary 1.7.5
 
diff --git a/src/lib/elc_ctxpopup.c b/src/lib/elc_ctxpopup.c
index ce4eac9..3327b01 100644
--- a/src/lib/elc_ctxpopup.c
+++ b/src/lib/elc_ctxpopup.c
@@ -377,6 +377,8 @@ _calc_base_geometry(Evas_Object *obj, Evas_Coord_Rectangle 
*rect)
                             &hover_area.y,
                             &hover_area.w,
                             &hover_area.h);
+   if (!strcmp(elm_widget_type_get(wd->parent), "elm_win"))
+     hover_area.x = hover_area.y = 0;
 
    evas_object_geometry_get(obj, &pos.x, &pos.y, NULL, NULL);
 
@@ -1299,6 +1301,8 @@ elm_ctxpopup_hover_parent_set(Evas_Object *obj, 
Evas_Object *parent)
 
    //Update Background
    evas_object_geometry_get(parent, &x, &y, &w, &h);
+   if (!strcmp(elm_widget_type_get(parent), "elm_win"))
+     x = y = 0;
    evas_object_move(wd->bg, x, y);
    evas_object_resize(wd->bg, w, h);
 

-- 

------------------------------------------------------------------------------
Own the Future-Intel&reg; 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://p.sf.net/sfu/intel_levelupd2d

Reply via email to