forked from enlightenment/efl
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 <cp.michael@samsung.com>
This commit is contained in:
parent
d7cbc84aa8
commit
8c9353e3ec
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue