~sircmpwn/casa

e8a71dc09057726046d6b99935a3d22a09ba22cc — Gy├Ârgy Kurucz 6 months ago 2b266bb
Fix bad logic in wl_seat_capabilities.
1 files changed, 6 insertions(+), 3 deletions(-)

M src/input.c
M src/input.c => src/input.c +6 -3
@@ 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;