We need to call `add_tablet` for each tablet device, not just if the
capability is new. Also, the tool needs to be added with `add_tool`.
`xournalpp` seems to be working now.
I wasn't sure if, or how, scaling should apply to the `scroll_value120`
events. But it seems both sway and kwin just multiply by the scale
factor then round, so that seems reasonable.
This seems to fix https://github.com/pop-os/cosmic-settings/issues/270.
It doesn't seem there's currently a way to iterate over input devices,
so this adds a `Vec` of libinput keyboard devices. When run with the
kms backend.
Not the most elegant solution, but it doesn't seem practical to add a
type generic to `Devices` given how backends are handled, and `Device`
can't be made into a trait object. Another trait could be added, but
this is fine, and technically should perform better (but if it actually
had to iterate over many keyboards, something has gone very wrong).
This matches Sway, and seems to make it harder to accidentally paste
text twice.
Perhaps this should be configurable in some way (not sure how it's
usually handled). But this is probably a better default.
`builtin_output` is similar to `get_builtin_output_name` in Sway.
For full support, we need support for touch targets/grabs, touch support
for SSDs, and a way to configure what output is mapped to what input.
But this is usable for apps that support touch on a laptop with a
touchscreen.
`axis_stop` should only be sent if the value is `Some(0)`, while this
also sent it for `None`. So every scroll event on one axis generated
stop events for the other.
This fixes scrolling with a touchpad in Alacritty.
Anvil already does this, comparing against `Some(0.0)`.