From 26788b33963a9f7b25ba0133540dbd1dd7a6978f Mon Sep 17 00:00:00 2001 From: Doyoun Kang Date: Fri, 2 Sep 2022 18:57:32 +0900 Subject: [PATCH] e_comp_object: Delay move when move_after_resize is true 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 | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/bin/e_comp_object.c b/src/bin/e_comp_object.c index c7140e1..2fecfc4 100644 --- a/src/bin/e_comp_object.c +++ b/src/bin/e_comp_object.c @@ -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)) -- 2.7.4