mirror of
https://github.com/labwc/labwc.git
synced 2026-04-11 08:21:13 -04:00
Fall out of touch cursor function if mouse emulation is set, rather than editing capabilities
This commit is contained in:
parent
05b57d95fe
commit
36bd2884e7
2 changed files with 8 additions and 7 deletions
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue