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:25:54 -0400
committerChris Michael <cp.michael@samsung.com>2015-12-03 12:02:40 -0500
commitbb0c94d04ac40453540ec243fc0dfe39fddcba61 (patch)
treee2a144b2a4a32fabf84ca4a0f4aaf370847dc618 /src/lib/ecore_wl2/ecore_wl2_input.c
parentecore-wl2: Destroy cursor theme when input is destroyed (diff)
downloadefl-bb0c94d04ac40453540ec243fc0dfe39fddcba61.tar.gz
ecore-wl2: Start on code for pointer leave 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.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/lib/ecore_wl2/ecore_wl2_input.c b/src/lib/ecore_wl2/ecore_wl2_input.c
index 77d063e3f7..ee95a21453 100644
--- a/src/lib/ecore_wl2/ecore_wl2_input.c
+++ b/src/lib/ecore_wl2/ecore_wl2_input.c
@@ -25,6 +25,7 @@ _pointer_cb_enter(void *data, struct wl_pointer *pointer EINA_UNUSED, unsigned i
if (!window) return;
input->focus.pointer = window;
+
/* TODO: send mouse in event */
}
@@ -32,9 +33,21 @@ static void
_pointer_cb_leave(void *data, struct wl_pointer *pointer EINA_UNUSED, unsigned int serial, struct wl_surface *surface)
{
Ecore_Wl2_Input *input;
+ Ecore_Wl2_Window *window;
input = data;
if (!input) return;
+
+ input->focus.pointer = NULL;
+
+ /* trap for a surface that was just destroyed */
+ if (!surface) return;
+
+ /* find the window which this surface belongs to */
+ window = _ecore_wl2_display_window_surface_find(input->display, surface);
+ if (!window) return;
+
+ /* TODO: send mouse out event */
}
static void