jbuchermn / newm

Wayland compositor
MIT License
960 stars 30 forks source link

Touch screen and pen support #112

Open timeopochin opened 2 years ago

timeopochin commented 2 years ago

Hello,

I have recently stumbled upon this very interesting project! I have a tablet PC with a touch screen and and wacom pen that both work flawlessly in sway. I can use a USB mouse in newm, but I cannot figure out how to make the touchscreen do anything.

Both the touch screen and pen show the correct outputs with evtest without sudo. Am I doing something wrong? Is touchscreen simply not implemented in pywm? This project looks very promising for a linux tablet.

Thank you in advance :)

jbuchermn commented 2 years ago

Hey,

touchscreen and the like use another wayland protocol than mouses and touchpads. This is implemented in sway, but not in newm (or more precisely pywm). As I don't own such a device, I can't really implement / test that...

Pandademic commented 2 years ago

@jbuchermn , do you know the details of how this is implemented in sway? I could try and implement it(or at least look at the issue) , as I do own a touchscreen laptop and a pen .....

jbuchermn commented 2 years ago

Take a look at the uses of wlr_tablet and wlr_touch in https://github.com/swaywm/sway/blob/master/sway/input/cursor.c

You'd have to add that functionality to pywm (analogous to wm_cursor)

Pandademic commented 2 years ago

@jbuchermn thanks for your quick reply! I'll try and take a look.

Estebiu commented 2 years ago

@jbuchermn thanks for your quick reply! I'll try and take a look.

Any updates?

Pandademic commented 2 years ago

@Estebiu I'm working on it at the moment, It's a little slow at the moment as I do not have much time on my hands at the moment, but with some luck I'll have more time to work on it over the next few days.