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
commit1bc837c3de1a3ee46d27184614e174547d3c29dd (patch)
tree67d92af0dfed036e9cb380aa6f617bb39abf75ec
parentd7d3c9adabcb80d05d00665c9bae509fcaa3b2ba (diff)
downloadefl-1bc837c3de1a3ee46d27184614e174547d3c29dd.tar.gz
ecore-wl2: redo ecore_wl2_window_move() to take a seat instead of coords
this triggers a move 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.c12
3 files changed, 13 insertions, 25 deletions
diff --git a/src/lib/ecore_wl2/Ecore_Wl2.h b/src/lib/ecore_wl2/Ecore_Wl2.h
index 723d1c27a7..8382379368 100644
--- a/src/lib/ecore_wl2/Ecore_Wl2.h
+++ b/src/lib/ecore_wl2/Ecore_Wl2.h
@@ -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
diff --git a/src/lib/ecore_wl2/ecore_wl2_window.c b/src/lib/ecore_wl2/ecore_wl2_window.c
index 1aadbcbcb3..e44484ff76 100644
--- a/src/lib/ecore_wl2/ecore_wl2_window.c
+++ b/src/lib/ecore_wl2/ecore_wl2_window.c
@@ -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;
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 9d3cde3582..4d60e19d1b 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
@@ -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