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);
|
EAPI void ecore_wl2_window_free(Ecore_Wl2_Window *window);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Move a given Ecore_Wl2_Window
|
* @brief Begin moving 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.
|
|
||||||
*
|
*
|
||||||
* @param window The Ecore_Wl2_Window which to move
|
* @param window The Ecore_Wl2_Window which to move
|
||||||
* @param x Desired x position of window
|
* @param input The seat on which the move is active on
|
||||||
* @param y Desired y position of window
|
|
||||||
*
|
*
|
||||||
* @ingroup Ecore_Wl2_Window_Group
|
* @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
|
* @brief Begin resizing a given window
|
||||||
|
|
|
@ -687,19 +687,13 @@ ecore_wl2_window_free(Ecore_Wl2_Window *window)
|
||||||
}
|
}
|
||||||
|
|
||||||
EAPI void
|
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);
|
EINA_SAFETY_ON_NULL_RETURN(window);
|
||||||
|
|
||||||
input = window->input;
|
if (!input)
|
||||||
if ((!input) && (window->parent))
|
input = ecore_wl2_display_input_find_by_name(window->display, "default");
|
||||||
{
|
EINA_SAFETY_ON_NULL_RETURN(input);
|
||||||
input = window->parent->input;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((!input) || (!input->wl.seat)) return;
|
|
||||||
|
|
||||||
window->moving = EINA_TRUE;
|
window->moving = EINA_TRUE;
|
||||||
|
|
||||||
|
|
|
@ -1565,17 +1565,15 @@ _ecore_evas_wayland_resize(Ecore_Evas *ee, int location)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
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;
|
Ecore_Evas_Engine_Wl_Data *wdata;
|
||||||
|
|
||||||
|
LOGFN(__FILE__, __LINE__, __FUNCTION__);
|
||||||
|
|
||||||
if (!ee) return;
|
if (!ee) return;
|
||||||
if (!strncmp(ee->driver, "wayland", 7))
|
wdata = ee->engine.data;
|
||||||
{
|
if (wdata->win) ecore_wl2_window_move(wdata->win, NULL);
|
||||||
wdata = ee->engine.data;
|
|
||||||
if (wdata->win)
|
|
||||||
ecore_wl2_window_move(wdata->win, x, y);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
|
Loading…
Reference in New Issue