forked from enlightenment/efl
ecore-wl2: redo ecore_wl2_window_resize() to take a seat instead of size
this triggers a resize operation and is seat-dependent
This commit is contained in:
parent
d0f707ef91
commit
d7d3c9adab
|
@ -694,20 +694,16 @@ EAPI void ecore_wl2_window_free(Ecore_Wl2_Window *window);
|
|||
EAPI void ecore_wl2_window_move(Ecore_Wl2_Window *window, int x, int y);
|
||||
|
||||
/**
|
||||
* Resize a given Ecore_Wl2_Window
|
||||
*
|
||||
* @brief The size requested (@p w, @p h) is not honored by Wayland because
|
||||
* Wayland does not allow specific window sizes to be set.
|
||||
* @brief Begin resizing a given window
|
||||
*
|
||||
* @param window The Ecore_Wl2_Window which to resize
|
||||
* @param w Desired width of window
|
||||
* @param h Desired height of window
|
||||
* @param input The seat on which the resize is active
|
||||
* @param location The edge of the window from where the resize should start
|
||||
*
|
||||
* @ingroup Ecore_Wl2_Window_Group
|
||||
* @since 1.17
|
||||
* @since 1.20
|
||||
*/
|
||||
EAPI void ecore_wl2_window_resize(Ecore_Wl2_Window *window, int w, int h, int location);
|
||||
EAPI void ecore_wl2_window_resize(Ecore_Wl2_Window *window, Ecore_Wl2_Input *input, int location);
|
||||
|
||||
/**
|
||||
* Raise a given Ecore_Wl2_Window
|
||||
|
|
|
@ -712,19 +712,13 @@ ecore_wl2_window_move(Ecore_Wl2_Window *window, int x EINA_UNUSED, int y EINA_UN
|
|||
}
|
||||
|
||||
EAPI void
|
||||
ecore_wl2_window_resize(Ecore_Wl2_Window *window, int w EINA_UNUSED, int h EINA_UNUSED, int location)
|
||||
ecore_wl2_window_resize(Ecore_Wl2_Window *window, Ecore_Wl2_Input *input, int location)
|
||||
{
|
||||
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);
|
||||
|
||||
if (window->zxdg_toplevel)
|
||||
zxdg_toplevel_v6_resize(window->zxdg_toplevel, input->wl.seat,
|
||||
|
|
|
@ -1560,11 +1560,7 @@ _ecore_evas_wayland_resize(Ecore_Evas *ee, int location)
|
|||
if (wdata->win)
|
||||
{
|
||||
_ecore_evas_wayland_resize_edge_set(ee, location);
|
||||
|
||||
if (ECORE_EVAS_PORTRAIT(ee))
|
||||
ecore_wl2_window_resize(wdata->win, ee->w, ee->h, location);
|
||||
else
|
||||
ecore_wl2_window_resize(wdata->win, ee->h, ee->w, location);
|
||||
ecore_wl2_window_resize(wdata->win, NULL, location);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue