ecore-wl2: Set window input on pointer enter/leave events
authorChris Michael <cp.michael@samsung.com>
Wed, 30 Sep 2015 15:10:04 +0000 (11:10 -0400)
committerChris Michael <cp.michael@samsung.com>
Thu, 3 Dec 2015 17:02:40 +0000 (12:02 -0500)
Summary: This is so that we can still change mouse cursor (to indicate resize)
even when the window does not have focus

Signed-off-by: Chris Michael <cp.michael@samsung.com>
src/lib/ecore_wl2/ecore_wl2_input.c

index 56fc4ed..f52c168 100644 (file)
@@ -486,6 +486,7 @@ _pointer_cb_enter(void *data, struct wl_pointer *pointer EINA_UNUSED, unsigned i
    window = _ecore_wl2_display_window_surface_find(input->display, surface);
    if (!window) return;
 
+   window->input = input;
    input->focus.pointer = window;
 
    _ecore_wl2_input_mouse_in_send(input, window);
@@ -510,6 +511,8 @@ _pointer_cb_leave(void *data, struct wl_pointer *pointer EINA_UNUSED, unsigned i
    window = _ecore_wl2_display_window_surface_find(input->display, surface);
    if (!window) return;
 
+   window->input = NULL;
+
    _ecore_wl2_input_mouse_out_send(input, window);
 }