e_comp_object: Delay move when move_after_resize is true 18/280718/1
authorDoyoun Kang <doyoun.kang@samsung.com>
Fri, 2 Sep 2022 09:57:32 +0000 (18:57 +0900)
committerTizen Window System <tizen.windowsystem@gmail.com>
Fri, 2 Sep 2022 10:21:44 +0000 (19:21 +0900)
This patch tries to resolve the problem that sub-surface can't be moved
at the time of sub-surface launch.

The problem is that, in _e_comp_intercept_move(), given (x,y) position
can be lost if move_after_resize flag is true, and it eventually makes
the comp_object not being moved to this position permanently.

The scenario from which the problem was discovered is as follow.

Creation of surface -> Creation of xdg_toplevel -> Apply maximize
policy -> Resize surface -> move_after_resize = true -> Creation of
subsurface -> wl_subsurface.set_position() -> wl_surface.commit()
-> evas_object_move() -> _e_comp_intercept_move() -> (*) if
(cw->ec->move_after_resize) return -> Buffer size changes -> Unset
move_after_resize

Change-Id: Ibffa65dcb009283071aee6afa6e9f461f502162d

src/bin/e_comp_object.c

index c7140e1..2fecfc4 100644 (file)
@@ -1533,7 +1533,16 @@ _e_comp_intercept_move(void *data, Evas_Object *obj, int x, int y)
      }
 
    if (cw->ec->move_after_resize)
-     return;
+     {
+        if ((x != cw->ec->x) || (y != cw->ec->y))
+          {
+             ELOGF("COMP", "Set Pos to (%d,%d). current ec_pos(%d,%d)", cw->ec, x, y, cw->ec->x, cw->ec->y);
+             e_client_pos_set(cw->ec, x, y);
+             cw->ec->changes.pos = 1;
+             EC_CHANGED(cw->ec);
+          }
+        return;
+     }
 
    if ((cw->ec->resize_mode == E_POINTER_RESIZE_NONE) &&
        (cw->ec->manage_resize.resize_obj))