path: root/src/lib/elementary
diff options
authorJean-Philippe Andre <jp.andre@samsung.com>2016-11-16 18:09:37 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2016-11-16 20:48:58 +0900
commitf50b0fed133b63887e43686bf3410bec422c5025 (patch)
tree7434a00d1c608869e31407bd813d929eed11fbb3 /src/lib/elementary
parentevas: Try to fix bad clipping of non-frame objects (diff)
elm/evas: Fix disappearance of window icons with CSD
After a few patches trying to fix clipping of frame or non-frame objects the icon finally ended up invisible. Even if the elm_icon was marked as is_frame, its internal evas object image would not have the flag set, thus it would be clipped out. Solution: Propagate the is_frame flag to all smart children, not only when setting it but also when adding new members. A hack with the API indicates that the frame edje is a very special object that does not propagate the flag. See also: 7ce79be1a1748c32c4d0e58358ce2242902cf89b 0f6c33eff106f7235351dd51ce7835041f548cc1 9c9c8809a7d90a5ab61c2c930c4cdaeb1d8e8c6a ac5ca9281c5ea374fb6d77c867cf478f29e70a83
Diffstat (limited to 'src/lib/elementary')
1 files changed, 13 insertions, 5 deletions
diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c
index 3ad9322c98..8f83f43525 100644
--- a/src/lib/elementary/efl_ui_win.c
+++ b/src/lib/elementary/efl_ui_win.c
@@ -3926,9 +3926,14 @@ _elm_win_frame_add(Efl_Ui_Win_Data *sd, const char *style)
- edje_object_part_swallow(sd->frame_obj, "elm.swallow.client", sd->edje);
+ /* Small hack: The special value 2 means this is the top frame object.
+ * We propagate to the children now (the edc group contents), but subsequent
+ * calls to smart_member_add will not propagate the flag further. Note that
+ * this little hack will fall apart if edje creates and destroys objects on
+ * the fly. */
+ efl_canvas_object_is_frame_object_set(sd->frame_obj, 2);
- evas_object_is_frame_object_set(sd->frame_obj, EINA_TRUE);
+ edje_object_part_swallow(sd->frame_obj, "elm.swallow.client", sd->edje);
if (sd->icon)
@@ -3952,8 +3957,8 @@ _elm_win_frame_add(Efl_Ui_Win_Data *sd, const char *style)
- edje_object_part_swallow(sd->frame_obj, "elm.swallow.icon",
- sd->icon);
+ edje_object_part_swallow(sd->frame_obj, "elm.swallow.icon", sd->icon);
+ efl_canvas_object_is_frame_object_set(sd->icon, EINA_TRUE);
(sd->frame_obj, EVAS_CALLBACK_MOVE, _elm_win_frame_obj_move, sd);
@@ -5201,7 +5206,10 @@ _efl_ui_win_icon_object_set(Eo *obj, Efl_Ui_Win_Data *sd, Evas_Object *icon)
evas_object_event_callback_add(sd->icon, EVAS_CALLBACK_DEL,
_elm_win_on_icon_del, obj);
if (sd->frame_obj)
- edje_object_part_swallow(sd->frame_obj, "elm.swallow.icon", sd->icon);
+ {
+ edje_object_part_swallow(sd->frame_obj, "elm.swallow.icon", sd->icon);
+ evas_object_is_frame_object_set(sd->icon, EINA_TRUE);
+ }