diff --git a/src/input/touch.c b/src/input/touch.c index f99b013e..eddc1e27 100644 --- a/src/input/touch.c +++ b/src/input/touch.c @@ -24,6 +24,13 @@ static struct wlr_surface* touch_get_coords(struct seat *seat, struct wlr_touch *touch, double x, double y, double *x_offset, double *y_offset) { + /* Fall out if mouse emulation is set */ + struct touch_config_entry *config_entry = + touch_find_config_for_device(touch->base.name); + if (config_entry->force_mouse_emulation) { + return NULL; + } + /* Convert coordinates: first [0, 1] => layout, then layout => surface */ double lx, ly; wlr_cursor_absolute_to_layout_coords(seat->cursor, &touch->base, diff --git a/src/seat.c b/src/seat.c index 1971a57f..fd249dd0 100644 --- a/src/seat.c +++ b/src/seat.c @@ -411,13 +411,7 @@ seat_update_capabilities(struct seat *seat) caps |= WL_SEAT_CAPABILITY_POINTER; break; case WLR_INPUT_DEVICE_TOUCH: - config_entry = - touch_find_config_for_device(input->wlr_input_device->name); - if (config_entry->force_mouse_emulation) { - caps |= WL_SEAT_CAPABILITY_POINTER; - } else { - caps |= WL_SEAT_CAPABILITY_TOUCH; - } + caps |= WL_SEAT_CAPABILITY_TOUCH; break; default: break;