forked from enlightenment/efl
ecore-wl2: Add API function to move a window
Signed-off-by: Chris Michael <cp.michael@samsung.com>
This commit is contained in:
parent
a5739c5ded
commit
e9b6c5d4b7
|
@ -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 */
|
||||
|
|
|
@ -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); */
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue