@@ 147,9 147,12 @@ static void
wl_seat_capabilities(void *data, struct wl_seat *wl_seat, uint32_t capabilities)
{
struct casa_state *state = data;
- if ((capabilities & WL_SEAT_CAPABILITY_TOUCH) && !state->touch) {
- state->touch = wl_seat_get_touch(wl_seat);
- wl_touch_add_listener(state->touch, &wl_touch_listener, state);
+ if (capabilities & WL_SEAT_CAPABILITY_TOUCH) {
+ if (!state->touch) {
+ state->touch = wl_seat_get_touch(wl_seat);
+ wl_touch_add_listener(state->touch,
+ &wl_touch_listener, state);
+ }
} else if (state->touch) {
wl_touch_release(state->touch);
state->touch = NULL;