ecore-wl2: Disable pointer frame callback if no cursor surface
authorChris Michael <cp.michael@samsung.com>
Thu, 27 Oct 2016 18:56:36 +0000 (14:56 -0400)
committerChris Michael <cp.michael@samsung.com>
Fri, 28 Oct 2016 13:55:27 +0000 (09:55 -0400)
If we have no cursor surface, then we don't need the pointer frame
callback anymore so call cursor_update_stop which will delete the
pointer frame callback

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

index b04d9a6..e5a0774 100644 (file)
@@ -953,7 +953,10 @@ ecore_wl2_window_pointer_set(Ecore_Wl2_Window *window, struct wl_surface *surfac
    input->cursor.hot_x = hot_x;
    input->cursor.hot_y = hot_y;
 
-   _ecore_wl2_input_cursor_update(input);
+   if (!input->cursor.surface)
+     _ecore_wl2_input_cursor_update_stop(input);
+   else
+     _ecore_wl2_input_cursor_update(input);
 }
 
 EAPI void