Use ecore_wl_window_surface_find to get the Ecore_Wl_Window.
authorChris Michael <cp.michael@samsung.com>
Tue, 21 May 2013 09:49:40 +0000 (10:49 +0100)
committerChris Michael <cp.michael@samsung.com>
Tue, 21 May 2013 09:49:40 +0000 (10:49 +0100)
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 <cp.michael@samsung.com>
src/lib/ecore_wayland/ecore_wl_input.c

index 0b7837b..cb54850 100644 (file)
@@ -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);