aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/elementary/efl_ui_win.c
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2016-10-11 12:39:05 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2016-10-12 11:25:56 +0900
commit11b7cf6b728001dbcd42ce41d5ac2e129a835fd8 (patch)
treefe09c44ddb1e8b72b0464231e2363256f937d0c8 /src/lib/elementary/efl_ui_win.c
parentevas: Move move_children_relative to legacy only (diff)
downloadefl-11b7cf6b728001dbcd42ce41d5ac2e129a835fd8.tar.gz
evas/elm: Remove function group_move
This is an override of efl_gfx_position_set. As for the other patches, I hope I didn't break anything. A problem likely to happen is that the super call was inserted too early or too late in the call flow. For instance: _myclass_position_set(obj, x, y) { position_set(super(obj), x, y); position_get(obj, &prevx, &prevy); do_something_with_delta_xy(); } The above code flow is obvisouly wrong, but may have crept in this patch (such a bug sneaked in inside smart object, breaking everything at first).
Diffstat (limited to 'src/lib/elementary/efl_ui_win.c')
-rw-r--r--src/lib/elementary/efl_ui_win.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/src/lib/elementary/efl_ui_win.c b/src/lib/elementary/efl_ui_win.c
index 24cf2995ea..5dca56fbdf 100644
--- a/src/lib/elementary/efl_ui_win.c
+++ b/src/lib/elementary/efl_ui_win.c
@@ -2766,8 +2766,11 @@ _elm_win_obj_intercept_show(void *data,
}
EOLIAN static void
-_efl_ui_win_efl_canvas_group_group_move(Eo *obj, Efl_Ui_Win_Data *sd, Evas_Coord x, Evas_Coord y)
+_efl_ui_win_efl_gfx_position_set(Eo *obj, Efl_Ui_Win_Data *sd, Evas_Coord x, Evas_Coord y)
{
+ if (_evas_object_intercept_call(obj, EVAS_OBJECT_INTERCEPT_CB_MOVE, 0, x, y))
+ return;
+
if (sd->img_obj)
{
if ((x != sd->screen.x) || (y != sd->screen.y))
@@ -2776,15 +2779,15 @@ _efl_ui_win_efl_canvas_group_group_move(Eo *obj, Efl_Ui_Win_Data *sd, Evas_Coord
sd->screen.y = y;
efl_event_callback_legacy_call(obj, EFL_GFX_EVENT_MOVE, NULL);
}
- return;
+ goto super_skip;
}
else
{
if (!sd->response) TRAP(sd, move, x, y);
- if (!ecore_evas_override_get(sd->ee)) return;
+ if (!ecore_evas_override_get(sd->ee)) goto super_skip;
}
- efl_canvas_group_move(efl_super(obj, MY_CLASS), x, y);
+ efl_gfx_position_set(efl_super(obj, MY_CLASS), x, y);
if (ecore_evas_override_get(sd->ee))
{
@@ -2806,6 +2809,15 @@ _efl_ui_win_efl_canvas_group_group_move(Eo *obj, Efl_Ui_Win_Data *sd, Evas_Coord
sd->screen.x = x;
sd->screen.y = y;
}
+
+ return;
+
+super_skip:
+ /* FIXME FIXME FIXME
+ * Ugly code flow: legacy code had an early return in smart_move, ie.
+ * evas object move would be processed but smart object move would be
+ * aborted. This super call tries to simulate that. */
+ efl_gfx_position_set(efl_super(obj, EFL_CANVAS_GROUP_CLASS), x, y);
}
EOLIAN static void