Open Danielduel opened 2 years ago
Touchscreen and stylus support is welcome in the main codebase. I haven't looked into it at all because I don't have the hardware to test it, but I'm happy to review any contributions even at an early stage if you'd like any guidance.
In general sway, and potentially other compositors, are a good reference for how this support should look. Vivarium probably would integrate them into the config in a different way though.
Started with capturing those events and rebranding them as pointer events which works (I mainly use touchscreen when I read docs in browser, so need that for very basic scrolling and button presses)... but this is very far from being perfect.
Yes, I will have to dig into their repos, because I don't understand some wl_client-related stuff, thank you for recommendations.
I will push code after reading sway code. Will write a follow-up comment here with what is my problem, because you might point me to correct place in viv to init what I am missing.
@inclement I think my biggest problem is (official wlroots repo, safe link) https://github.com/swaywm/wlroots/blob/master/types/seat/wlr_seat_touch.c#L138
That client == NULL || wl_list_empty(&client->touches)
is true.
As an afterthought - I haven't checked if client is not NULL there, but I blindly assumed that later part is the core issue - could you tell me if vivarium is responsible of initing client->touches
(if yes - could you point me to a right function)?
It's hard to say without working through the full client api, but I note that file has a seat_client_create_touch
function which appears responsible for populating the client->touches
list. Is that what you're looking for?
Yes, it is something that I looked into, but I didn't understood where in this whole picture is wl_client. I have to read more :)
// Found the place in sway project where it refers to touch handling, reading that :mag:
Hello, do we want to add such (touchscreen and stylus) support in main codebase or I have to keep that on own fork?
// this feature is nowhere near being ready, starts to work, but still there is a lot of work to be done