diff --git a/src/lib/ecore_wl2/Ecore_Wl2.h b/src/lib/ecore_wl2/Ecore_Wl2.h index e059e17361..16743c1209 100644 --- a/src/lib/ecore_wl2/Ecore_Wl2.h +++ b/src/lib/ecore_wl2/Ecore_Wl2.h @@ -283,6 +283,17 @@ EAPI void ecore_wl2_window_hide(Ecore_Wl2_Window *window); */ EAPI void ecore_wl2_window_free(Ecore_Wl2_Window *window); +/** + * Move a given Ecore_Wl2_Window + * + * @param window The Ecore_Wl2_Window which to move + * @param x Desired x position of window + * @param y Desired y position of window + * + * @ingroup Ecore_Wl2_Window_Group + */ +EAPI void ecore_wl2_window_move(Ecore_Wl2_Window *window, int x, int y); + /* # ifdef __cplusplus */ /* } */ /* # endif */ diff --git a/src/lib/ecore_wl2/ecore_wl2_window.c b/src/lib/ecore_wl2/ecore_wl2_window.c index 7f354f015b..9b6cd132d3 100644 --- a/src/lib/ecore_wl2/ecore_wl2_window.c +++ b/src/lib/ecore_wl2/ecore_wl2_window.c @@ -299,3 +299,25 @@ ecore_wl2_window_free(Ecore_Wl2_Window *window) free(window); } + +EAPI void +ecore_wl2_window_move(Ecore_Wl2_Window *window, int x, int y) +{ + EINA_SAFETY_ON_NULL_RETURN(window); + + /* test for no-op move */ + if ((window->geometry.x == x) && (window->geometry.y == y)) + return; + + window->geometry.x = x; + window->geometry.y = y; + + /* TODO: input grab release ? */ + + /* TODO: enable once input is done */ + /* if (window->xdg_surface) */ + /* xdg_surface_move(window->xdg_surface, seat, window->display->serial); */ + /* else if (window->wl_shell_surface) */ + /* wl_shell_surface_move(window->wl_shell_surface, seat, */ + /* window->display->serial); */ +}