The only reason it's included there is for a declaration of
struct sway_server, but we can just forward-declare it.
This avoids rebuilding almost all of Sway when touching server.h.
All other server.h includes are from source files, not headers.
`handle_tablet_tool_set_cursor` was copied from input/cursor.c's
`handle_request_set_cursor`, but the focused surface check was not
adjusted appropriately.
Fixes#5257.
If a pad device for a tablet exists, reloading the configuration,
removing/reading the device or even suspending the system will recreate
the same Wayland input device multiple times.
Make sure we don't re-create the same Wayland device more than
necessary.
Signed-off-by: Olivier Fourdan <ofourdan@redhat.com>
Sway has basic support for drawing tablets, but does not expose
properties such as pressure sensitivity. This implements the wlr tablet
v2 protocol, providing tablet events to Wayland clients.