devilhorns pushed a commit to branch master.
commit f0289a193697adf324406cdd9d2b491f4472858f
Author: Chris Michael <[email protected]>
Date: Tue Jul 23 07:12:40 2013 +0100
Check for valid input->pointer before calling wl_pointer_set_cursor.
During a pointer_enter event, if the window was assigned a custom
cursor, respect it. By default we will still set left_arrow initially,
but if the window was assigned a custom cursor, use it.
NB: Fixes Phab T230
Signed-off-by: Chris Michael <[email protected]>
---
src/lib/ecore_wayland/ecore_wl_input.c | 21 +++++++++++++++++++--
1 file changed, 19 insertions(+), 2 deletions(-)
diff --git a/src/lib/ecore_wayland/ecore_wl_input.c
b/src/lib/ecore_wayland/ecore_wl_input.c
index ec533ea..1cde8c0 100644
--- a/src/lib/ecore_wayland/ecore_wl_input.c
+++ b/src/lib/ecore_wayland/ecore_wl_input.c
@@ -182,8 +182,9 @@ ecore_wl_input_pointer_set(Ecore_Wl_Input *input, struct
wl_surface *surface, in
if (!input) return;
_pointer_update_stop(input);
- wl_pointer_set_cursor(input->pointer, input->pointer_enter_serial,
- surface, hot_x, hot_y);
+ if (input->pointer)
+ wl_pointer_set_cursor(input->pointer, input->pointer_enter_serial,
+ surface, hot_x, hot_y);
}
static Eina_Bool
@@ -801,6 +802,18 @@ _ecore_wl_input_cb_pointer_enter(void *data, struct
wl_pointer *pointer EINA_UNU
win->pointer_device = input;
input->pointer_focus = win;
+ if (win->pointer.set)
+ {
+ ecore_wl_input_pointer_set(input, win->pointer.surface,
+ win->pointer.hot_x,
win->pointer.hot_y);
+ }
+ /* NB: Commented out for now. Not needed in most circumstances,
+ * but left here for any corner-cases */
+ /* else */
+ /* { */
+ /* _ecore_wl_input_cursor_update(input); */
+ /* } */
+
_ecore_wl_input_mouse_in_send(input, win, input->timestamp);
}
@@ -849,6 +862,10 @@ _ecore_wl_input_cb_pointer_leave(void *data, struct
wl_pointer *pointer EINA_UNU
input->display->serial = serial;
+ /* NB: Commented out for now. Not needed in most circumstances, but left
+ * here for any corner-cases */
+ /* _ecore_wl_input_cursor_update(input); */
+
if (!surface) return;
if (!(win = ecore_wl_window_surface_find(surface))) return;
--
------------------------------------------------------------------------------
See everything from the browser to the database with AppDynamics
Get end-to-end visibility with application monitoring from AppDynamics
Isolate bottlenecks and diagnose root cause in seconds.
Start your free trial of AppDynamics Pro today!
http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk