summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@osg.samsung.com>2017-05-17 16:02:53 -0400
committerMike Blumenkrantz <zmike@osg.samsung.com>2017-05-19 12:41:16 -0400
commitd7d3c9adabcb80d05d00665c9bae509fcaa3b2ba (patch)
tree46c8933e4b8e799fe165e9a250dae8b66b94f9e1
parentd0f707ef913d4ef2b4598ab0b2bf2aa43041e060 (diff)
downloadefl-d7d3c9adabcb80d05d00665c9bae509fcaa3b2ba.tar.gz
ecore-wl2: redo ecore_wl2_window_resize() to take a seat instead of size
this triggers a resize operation and is seat-dependent
-rw-r--r--src/lib/ecore_wl2/Ecore_Wl2.h12
-rw-r--r--src/lib/ecore_wl2/ecore_wl2_window.c14
-rw-r--r--src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c6
3 files changed, 9 insertions, 23 deletions
diff --git a/src/lib/ecore_wl2/Ecore_Wl2.h b/src/lib/ecore_wl2/Ecore_Wl2.h
index 3fdd59058a..723d1c27a7 100644
--- a/src/lib/ecore_wl2/Ecore_Wl2.h
+++ b/src/lib/ecore_wl2/Ecore_Wl2.h
@@ -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
diff --git a/src/lib/ecore_wl2/ecore_wl2_window.c b/src/lib/ecore_wl2/ecore_wl2_window.c
index 3f75c72018..1aadbcbcb3 100644
--- a/src/lib/ecore_wl2/ecore_wl2_window.c
+++ b/src/lib/ecore_wl2/ecore_wl2_window.c
@@ -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,
diff --git a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c
index 4db8b1000f..9d3cde3582 100644
--- a/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c
+++ b/src/modules/ecore_evas/engines/wayland/ecore_evas_wayland_common.c
@@ -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);
}
}