Commit graph

3 commits

Author SHA1 Message Date
Peter Hutterer
e6b280a98e libei: make the pointer/touch ranges constant and client-determined
We assume that any libei client has access to the windowing system through
other means (at least where it matters) so they can set up the pointer range
accordingly. This also allows the server to do heuristics on monitor mapping,
similar to what we have for Wacom tablets already.

And forcing the ranges to be constant means the race conditions are halved,
only the client is now affected by a potential race condition between the
screen size changing and the pointer ranges needing updates. Those can be
mitigated by the server though, e.g. an input device that maps to a
single-monitor *should* still be mapped to that same monitor after another
monitor is plugged in (and this should apply before the client is notified of
the screen mapping). So the client events in transit will still go to the
right position of the screen (though admittedly the target areas may have
migrated to the new screen so the click now goes wrong anyway).

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-07-16 10:17:13 +10:00
Peter Hutterer
562e120da8 libei: change the device creation API a bit
Split into a _new() call and make the others setters, with a bit more
explanation of what the server does.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2020-07-16 10:17:12 +10:00
Peter Hutterer
5e649f682a Initial commit
This is the outline of the API intended with a minimal compiler just to verify
there are no immediate parsing issues.
2020-07-16 10:17:09 +10:00