This is tested with Gtk clients. There are a number of TODO items:
- hardcoded scaling for mapping the touch co-ordinate system
into layout co-ordinates (works on my Pinephone :-).
- we should send events to the client no matter what the Lua handler
returns (I think the code to not do this is broken
anyway...). Instead, if the handler returns true we should send the
client a touch cancel event.
- maybe there's a better way to deal with seat capabilities than
adding a "touchpads" field to kiwmi_input
This is needed in order for wlroots to interpret some values (mostly
coords of absolute input events) correctly. It for example fixes how the
pointer behaves with WLR_WL_OUTPUTS=2.
In order to also map the pointer/output pair when the pointer is created
before the output, a list of pointers has to be managed, which wasn't
needed until now.
Until now, focusing a different view didn't move pointer focus to it,
even though it was under the cursor. The pointer had to move in order
to switch its focus. Similar situations should be handled after this
commit.
Requires moving wlr_seat initialization above cursor creation, so we can
add listeners to it. Currently does no verification that the client
actually has focus.