Commit graph

21 commits

Author SHA1 Message Date
John Lindgren
d2ce31fcc9 tree-wide: use forward declarations for wlr types 2025-09-07 19:34:30 +09:00
John Lindgren
7c185c1a85 include: reduce unnecessary #includes 2025-09-07 19:34:30 +09:00
John Lindgren
9d49d19cd2 include: add config/types.h 2025-08-21 16:55:25 +09:00
John Lindgren
c9b576982d include: add missing header dependencies
Ensure that headers compile correctly regardless of include order.
2025-07-29 21:51:56 +01:00
Jens Peters
bdd1b8dc60 input: handle tablet tool creation internally
No need anymore to expose this function.
2025-06-14 13:45:51 +01:00
Jens Peters
6f6fcbc2e1 input: move tablet tool functions into tablet.c
Just a big move and a rename of the tablet tool destroy handler.
2025-06-14 13:45:51 +01:00
Jens Peters
9cf9e129e1 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.
2025-06-14 13:45:51 +01:00
Jens Peters
cf032b1fc1 input: do not bind motion mode to tablet
Instead, always derive it from the current tool. This prevents any
mismatches when working with multiple tools.
2025-06-08 05:31:23 +09:00
Jens Peters
dd0cee02a4 input: move cursor event listeners from tablet to seat
Otherwise we would subscribe multiple times to the
same event when having multiple tablets.
2024-08-13 18:40:34 +02:00
Jens Peters
060626e9c7 input: subscribe to tablet tool events from cursor
Contrary to the raw tablet events, the cursor events transform
the coordinates based on a mapped output orientation.
Otherwise those events are the same.
2024-08-08 20:27:06 +01:00
Jens Peters
a2f25bea1a config: add configuration for tablet tool motion 2024-07-19 22:45:41 +01:00
Jens Peters
8501a1281c input: support tablet tools with relative motion 2024-07-19 22:45:41 +01:00
Jens Peters
61e5e0e4d9 input: track tablets and tablet-pads at seat 2024-06-13 21:23:37 +01:00
Jens Peters
f6c91c8d13 input: always notify all tablet axis
Notify all axis based on the capabilities of the
tablet tool. At least GTK applications expect
this for e.g. smooth pressure or distance events.
2024-06-08 22:33:00 +01:00
Jens Peters
fb57d61f35 input: add tablet-v2 notifications for axis and buttons
Similar like touch, this is guarded by checking if
a surface accepts the tablet protocol. Also reuse
common cursor logic.

Intialize tablet tools on proximity.
Notify idle manager about activity on events.
2024-05-27 22:40:50 +02:00
Jens Peters
abfa100b38 input: add tablet tool setup 2024-05-27 22:40:50 +02:00
Jens Peters
f8a7d18cf0 input: ignore not supported tablet tools
We currently only support cursor emulation
for absolute motion, thus ignore tools/pens
that use relative motion.

Add a log statement on proximity-in to give
some feedback.
2024-05-19 21:21:52 +01:00
Jens Peters
6def1319d1 input: move function to config
This function is only about rc, so fits better
in config.
2024-01-22 21:50:18 +00:00
Jens Peters
b01d7dbf38 input: add missing new lines 2024-01-10 21:10:11 +00:00
Jens Peters
c2687d9281 input: add tablet pad setup and button handler
Split pad initialization from tablet initialization to
avoid conflicting handler names.
Also reuse 'get_mapped_button'.
2024-01-02 21:28:42 +00:00
Jens Peters
20bba35570 input: rename drawing_tablet to tablet 2023-12-29 20:22:46 +00:00
Renamed from include/input/drawing_tablet.h (Browse further)