- struct touch *touch = data;
-
- if ((caps & WL_SEAT_CAPABILITY_TOUCH) && !touch->wl_touch) {
- touch->wl_touch = wl_seat_get_touch(seat);
- wl_touch_set_user_data(touch->wl_touch, touch);
- wl_touch_add_listener(touch->wl_touch, &touch_listener, touch);
- } else if (!(caps & WL_SEAT_CAPABILITY_TOUCH) && touch->wl_touch) {
- wl_touch_destroy(touch->wl_touch);
- touch->wl_touch = NULL;
+ struct seat *seat = data;
+ struct touch *touch = seat->touch;
+
+ if ((caps & WL_SEAT_CAPABILITY_TOUCH) && !seat->wl_touch) {
+ seat->wl_touch = wl_seat_get_touch(wl_seat);
+ wl_touch_set_user_data(seat->wl_touch, touch);
+ wl_touch_add_listener(seat->wl_touch, &touch_listener, touch);
+ } else if (!(caps & WL_SEAT_CAPABILITY_TOUCH) && seat->wl_touch) {
+ wl_touch_destroy(seat->wl_touch);
+ seat->wl_touch = NULL;