if ((caps & WL_SEAT_CAPABILITY_TOUCH) && (!input->touch))
{
input->touch = wl_seat_get_touch(seat);
- wl_touch_set_user_data(input->touch, input);
- wl_touch_add_listener(input->touch, &touch_listener, input);
+ if (input->touch)
+ {
+ wl_touch_set_user_data(input->touch, input);
+ wl_touch_add_listener(input->touch, &touch_listener, input);
+ }
}
else if (!(caps & WL_SEAT_CAPABILITY_TOUCH) && (input->touch))
{
* here for any corner-cases */
/* _ecore_wl_input_cursor_update(input); */
- if (!surface) return;
if (!(win = ecore_wl_window_surface_find(surface))) return;
win->pointer_device = NULL;
input->display->serial = serial;
- if (!surface) return;
if (!(win = ecore_wl_window_surface_find(surface))) return;
win->keyboard_device = NULL;