forked from enlightenment/efl
ecore-wl2: redo ecore_wl2_window_move() to take a seat instead of coords
this triggers a move operation and is seat-dependent
This commit is contained in:
parent
d7d3c9adab
commit
1bc837c3de
|
@ -679,19 +679,15 @@ 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
|
||||
*
|
||||
* @brief The position requested (@p x, @p y) is not honored by Wayland because
|
||||
* Wayland does not allow specific window placement to be set.
|
||||
* @brief Begin moving 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
|
||||
* @param input The seat on which the move is active on
|
||||
*
|
||||
* @ingroup Ecore_Wl2_Window_Group
|
||||
* @since 1.17
|
||||
* @since 1.20
|
||||
*/
|
||||
EAPI void ecore_wl2_window_move(Ecore_Wl2_Window *window, int x, int y);
|
||||
EAPI void ecore_wl2_window_move(Ecore_Wl2_Window *window, Ecore_Wl2_Input *input);
|
||||
|
||||
/**
|
||||
* @brief Begin resizing a given window
|
||||
|
|
|
@ -687,19 +687,13 @@ ecore_wl2_window_free(Ecore_Wl2_Window *window)
|
|||
}
|
||||
|
||||
EAPI void
|
||||
ecore_wl2_window_move(Ecore_Wl2_Window *window, int x EINA_UNUSED, int y EINA_UNUSED)
|
||||
ecore_wl2_window_move(Ecore_Wl2_Window *window, Ecore_Wl2_Input *input)
|
||||
{
|
||||
Ecore_Wl2_Input *input;
|
||||
|
||||
EINA_SAFETY_ON_NULL_RETURN(window);
|
||||
|
||||
input = window->input;
|
||||
if ((!input) && (window->parent))
|
||||
{
|
||||
input = window->parent->input;
|
||||
}
|
||||
|
||||
if ((!input) || (!input->wl.seat)) return;
|
||||
if (!input)
|
||||
input = ecore_wl2_display_input_find_by_name(window->display, "default");
|
||||
EINA_SAFETY_ON_NULL_RETURN(input);
|
||||
|
||||
window->moving = EINA_TRUE;
|
||||
|
||||
|
|
|
@ -1565,17 +1565,15 @@ _ecore_evas_wayland_resize(Ecore_Evas *ee, int location)
|
|||
}
|
||||
|
||||
static void
|
||||
_ecore_evas_wayland_move(Ecore_Evas *ee, int x, int y)
|
||||
_ecore_evas_wayland_move(Ecore_Evas *ee, int x EINA_UNUSED, int y EINA_UNUSED)
|
||||
{
|
||||
Ecore_Evas_Engine_Wl_Data *wdata;
|
||||
|
||||
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||
|
||||
if (!ee) return;
|
||||
if (!strncmp(ee->driver, "wayland", 7))
|
||||
{
|
||||
wdata = ee->engine.data;
|
||||
if (wdata->win)
|
||||
ecore_wl2_window_move(wdata->win, x, y);
|
||||
}
|
||||
wdata = ee->engine.data;
|
||||
if (wdata->win) ecore_wl2_window_move(wdata->win, NULL);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Reference in New Issue