Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Touchscreen and stylus support #113

Open
Danielduel opened this issue Feb 7, 2022 · 7 comments
Open

Touchscreen and stylus support #113

Danielduel opened this issue Feb 7, 2022 · 7 comments

Comments

@Danielduel
Copy link

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

@inclement
Copy link
Owner

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.

@Danielduel
Copy link
Author

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.

@Danielduel
Copy link
Author

@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)?

@inclement
Copy link
Owner

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?

@Danielduel
Copy link
Author

Danielduel commented Feb 11, 2022

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 🔍

@colesnicov
Copy link

The progress?

@colesnicov
Copy link

colesnicov commented Dec 25, 2024

I also need touch. I have some library that detects gestures aka touch (include counted touches in time interval..) , move and more (actual, ugly implementation). For me, the question is how vivarium works. I can't run the debugger, I can't trace it. Wayland is an island for me for now. I would like to get involved in development. I wrote about it #142

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants