aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/ecore_wl2/ecore_wl2_input.c
diff options
context:
space:
mode:
authorChris Michael <cp.michael@samsung.com>2015-09-10 13:34:26 -0400
committerChris Michael <cp.michael@samsung.com>2015-12-03 12:02:40 -0500
commit1f4b386664f6dbf09106c5fe6a369a11cba64571 (patch)
treea336a4be0989f9de7a5d695bfe8e270a515f5001 /src/lib/ecore_wl2/ecore_wl2_input.c
parentecore-wl2: Start on code for pointer leave event (diff)
downloadefl-1f4b386664f6dbf09106c5fe6a369a11cba64571.tar.gz
ecore-wl2: Start on code for pointer motion event
Signed-off-by: Chris Michael <cp.michael@samsung.com>
Diffstat (limited to 'src/lib/ecore_wl2/ecore_wl2_input.c')
-rw-r--r--src/lib/ecore_wl2/ecore_wl2_input.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/lib/ecore_wl2/ecore_wl2_input.c b/src/lib/ecore_wl2/ecore_wl2_input.c
index ee95a21453..b417423c37 100644
--- a/src/lib/ecore_wl2/ecore_wl2_input.c
+++ b/src/lib/ecore_wl2/ecore_wl2_input.c
@@ -57,6 +57,23 @@ _pointer_cb_motion(void *data, struct wl_pointer *pointer EINA_UNUSED, unsigned
input = data;
if (!input) return;
+
+ /* get currently focused window */
+ window = input->focus.pointer;
+ if (!window) return;
+
+ /* trap for a surface that was just destroyed */
+ if (!surface) return;
+
+ input->pointer.sx = wl_fixed_to_double(sx);
+ input->pointer.sy = wl_fixed_to_double(sy);
+
+ /* NB: Unsure if we need this just yet, so commented out for now */
+ /* if ((input->pointer.sx > window->geometry.w) || */
+ /* (input->pointer.sy > window->geometry.h)) */
+ /* return; */
+
+ /* TODO: send mouse move event */
}
static void