From 8c9353e3ec46681973ad09468dd43a46a379943c Mon Sep 17 00:00:00 2001 From: Chris Michael Date: Tue, 21 May 2013 10:49:40 +0100 Subject: [PATCH] Use ecore_wl_window_surface_find to get the Ecore_Wl_Window. NB: This is needed because some compositors like Weston are expecting the wl_surface user_data to be a buffer, not some arbitrary data. Signed-off-by: Chris Michael --- src/lib/ecore_wayland/ecore_wl_input.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/lib/ecore_wayland/ecore_wl_input.c b/src/lib/ecore_wayland/ecore_wl_input.c index 0b7837b..cb54850 100644 --- a/src/lib/ecore_wayland/ecore_wl_input.c +++ b/src/lib/ecore_wayland/ecore_wl_input.c @@ -754,7 +754,7 @@ _ecore_wl_input_cb_pointer_enter(void *data, struct wl_pointer *pointer EINA_UNU /* The cursor on the surface is undefined until we set it */ ecore_wl_input_cursor_from_name_set(input, "left_ptr"); - if ((win = wl_surface_get_user_data(surface))) + if ((win = ecore_wl_window_surface_find(surface))) { win->pointer_device = input; input->pointer_focus = win; @@ -808,7 +808,7 @@ _ecore_wl_input_cb_pointer_leave(void *data, struct wl_pointer *pointer EINA_UNU input->display->serial = serial; if (!surface) return; - if (!(win = wl_surface_get_user_data(surface))) return; + if (!(win = ecore_wl_window_surface_find(surface))) return; win->pointer_device = NULL; input->pointer_focus = NULL; @@ -845,7 +845,7 @@ _ecore_wl_input_cb_keyboard_enter(void *data, struct wl_keyboard *keyboard EINA_ input->display->serial = serial; - if (!(win = wl_surface_get_user_data(surface))) return; + if (!(win = ecore_wl_window_surface_find(surface))) return; win->keyboard_device = input; input->keyboard_focus = win; @@ -887,7 +887,7 @@ _ecore_wl_input_cb_keyboard_leave(void *data, struct wl_keyboard *keyboard EINA_ input->display->serial = serial; if (!surface) return; - if (!(win = wl_surface_get_user_data(surface))) return; + if (!(win = ecore_wl_window_surface_find(surface))) return; win->keyboard_device = NULL; _ecore_wl_input_focus_out_send(input, win, input->timestamp); -- 2.7.4