Handling of `PointerTarget::motion` should be unchanged.
`PointerTarget::enter` previously was comparing `loc - geo` rather than
`loc`. The generic version could accommodate that, but I assume this was
incorrect, and the position sent to `enter` wasn't handled correctly.
Using `is_tiled()` here doesn't work for fullscreen windows, since
`is_tiled()` returns `false` for them.
This (plus the previous changes for supporting minimize) seems to fix
the behavior of `SDL_MINIMIZE_ON_FOCUS_LOSS` in XWayland applications
(https://github.com/pop-os/cosmic-comp/issues/231). Wine had a similar
issue, though I haven't tested it yet.
It doesn't seem ideal visually that the fullscreen window becomes tiled
then minimized itself, but that's less of a problem.
May need to check if this is an issue with any other uses of `is_tiled()`
or `is_floating()`.
Cosmic-comp seems to spend a lot of CPU time here, particularly in debug
builds. The Iced tiny-skia render probably could use some optimization,
but it's expected that software rendering without optimization will
perform quite poorly.
Optimizing just these crates doesn't seem to add measurably to build
time but does help noticeably.
* fix: Crash on malformed config
* fix: Have default mappings when missing config
---------
Co-authored-by: Victoria Brekenfeld <4404502+Drakulix@users.noreply.github.com>
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).