input: move tablet axis members to tablet tool

It doesn't matter much since those are about the combination
of tablet and tablet tool. That said, this feels slightly more
natural.
As a consequence we always create a tablet tool and decide
indirectly via `tablet_get_coords()` and the returning surface
if mouse emulation should be used or not. Now we can also
add a `motion_mode` to the tablet tool which is slightly cleaner.
This commit is contained in:
Jens Peters 2025-06-08 08:27:25 +02:00 committed by Johan Malm
parent ab9cf4dc97
commit 9cf9e129e1
4 changed files with 116 additions and 108 deletions

View file

@ -10,6 +10,22 @@ struct seat;
struct drawing_tablet_tool {
struct seat *seat;
struct wlr_tablet_v2_tablet_tool *tool_v2;
/*
* Force mouse emulation just for a specific tool,
* even when global mouse emulation for tablet input
* is off.
*/
bool force_mouse_emulation;
enum motion motion_mode;
double x, y, dx, dy;
double distance;
double pressure;
double tilt_x, tilt_y;
double rotation;
double slider;
double wheel_delta;
struct {
struct wl_listener set_cursor;
struct wl_listener destroy;

View file

@ -14,13 +14,6 @@ struct drawing_tablet {
struct seat *seat;
struct wlr_tablet *tablet;
struct wlr_tablet_v2_tablet *tablet_v2;
double x, y, dx, dy;
double distance;
double pressure;
double tilt_x, tilt_y;
double rotation;
double slider;
double wheel_delta;
struct {
struct wl_listener destroy;
} handlers;