efl_ui_win: fix position,changed eventing
authorMike Blumenkrantz <zmike@samsung.com>
Mon, 4 Mar 2019 18:37:42 +0000 (13:37 -0500)
committerJunsuChoi <jsuya.choi@samsung.com>
Thu, 14 Mar 2019 05:46:26 +0000 (14:46 +0900)
Summary:
the eo event needs to send position data and manually call the old
smart callback
Depends on D8086

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric, #reviewers, #committers

Tags: #efl_api

Differential Revision: https://phab.enlightenment.org/D8087

src/lib/elementary/efl_ui_win.c

index f501472e7547855d31821c6b9240d0353feabeff..eeefc3b767525b2261b1a0ec291cdc911139cc34 100644 (file)
@@ -1099,14 +1099,16 @@ _elm_win_move(Ecore_Evas *ee)
    Efl_Ui_Win_Data *sd = _elm_win_associate_get(ee);
    int x, y;
    Eo *obj;
+   Eina_Position2D pos;
 
    if (!sd) return;
    obj = sd->obj;
 
    ecore_evas_geometry_get(ee, &x, &y, NULL, NULL);
-   sd->screen.x = x;
-   sd->screen.y = y;
-   efl_event_callback_legacy_call(sd->obj, EFL_GFX_ENTITY_EVENT_POSITION_CHANGED, NULL);
+   pos.x = sd->screen.x = x;
+   pos.y = sd->screen.y = y;
+   efl_event_callback_call(sd->obj, EFL_GFX_ENTITY_EVENT_POSITION_CHANGED, &pos);
+   evas_object_smart_callback_call(sd->obj, "move", NULL);
    ELM_WIN_DATA_ALIVE_CHECK(obj, sd);
    evas_nochange_push(evas_object_evas_get(sd->obj));
    sd->response++;
@@ -3702,7 +3704,8 @@ _efl_ui_win_efl_gfx_entity_position_set(Eo *obj, Efl_Ui_Win_Data *sd, Eina_Posit
           {
              sd->screen.x = pos.x;
              sd->screen.y = pos.y;
-             efl_event_callback_legacy_call(obj, EFL_GFX_ENTITY_EVENT_POSITION_CHANGED, NULL);
+             efl_event_callback_call(obj, EFL_GFX_ENTITY_EVENT_POSITION_CHANGED, &pos);
+             evas_object_smart_callback_call(obj, "move", NULL);
           }
         goto super_skip;
      }
@@ -3729,7 +3732,8 @@ _efl_ui_win_efl_gfx_entity_position_set(Eo *obj, Efl_Ui_Win_Data *sd, Eina_Posit
      {
         sd->screen.x = pos.x;
         sd->screen.y = pos.y;
-        efl_event_callback_legacy_call(obj, EFL_GFX_ENTITY_EVENT_POSITION_CHANGED, NULL);
+        efl_event_callback_call(obj, EFL_GFX_ENTITY_EVENT_POSITION_CHANGED, &pos);
+        evas_object_smart_callback_call(obj, "move", NULL);
      }
    if (sd->frame_obj)
      {