-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
[Wayland] Add support for tablet-unstable-v2 protocol #5344
Comments
Implementing enough to fill the X11 gap would be a good start, I think - wiring up the whole thing could be done as a bigger feature later if it's a lot more work on top of getting the critical events. |
Looks like we're in the last couple weeks before tagging... did this end up moving at all? I don't have the hardware to check this out myself. |
Sorry, I'm not familiar with the SDL development process. Could you elaborate on
|
I hadn't checked the WIP branches (I'm mostly on a phone this weekend) so I wasn't sure if there was still being work done on the support. FWIW the code seemed fine from what I remember, so if there's a bare minimum that gets osu!lazer back up and running that will be more than enough for us to work with, we can patch things up during the PR process super quickly. |
sure, I'll rebase and create a MR |
The initial integration is in via #5424 - it's not super thorough support but it gets us past the major regression from moving to Wayland. Will unmark the milestone but leave this open as a long-term thing for someone to poke at! |
The internal pen API in #5481 could prevent pen motion events from updating the cached mouse cursor position. Would that help? Is the |
I would think so - I think libdecor gets its inputs separately from us, though: https://gitlab.gnome.org/jadahl/libdecor/-/blob/master/src/plugins/cairo/libdecor-cairo.c#L2485 Also, self-assigning just to have it in the Wayland tracker, not actively looking at this myself since I don't have any hardware to check against. |
I've attempted to add Wayland support to #5481 . However, running my distribution's (I tried building |
while it seems like weston builds the tablet v2 wayland api (https://gitlab.freedesktop.org/wayland/weston/-/blob/main/protocol/meson.build#L28) but doesn't actually seem to implement it. See (https://lists.freedesktop.org/archives/wayland-devel/2020-January/041184.html and https://gitlab.freedesktop.org/wayland/weston/-/issues/359) you could try on of the wlroots distros (I've tested with swaywm and wayfire), KWin or GNOMEs Mutter. I'm not quite sure what issue you try to address in the second paragraph (is the wayland scanner in /usr/bin outdated?) - but you need general docs, I can recommend the Wayland section of Wacoms developer docs https://developer-docs.wacom.com/intuos-cintiq-business-tablets/docs/wayland-overview if you haven't seen it already. |
But your wayland support works for me on GNOME at least. The only big issue I see is that is somehow considers the pen to have infinite pressure? |
Thank you very much! The bug was lack of normalisation of the tilt angles. Could you check if the tilt fix helps, please? One thing I am a bit concerned about is that the Wayland spec states that it reports tilt angles (rather than vectors, which is what Xinput2 seems to be doing). For now I've left in what I believe to be a buggy implementation-- the bug would show up by the tilt vector pointing a bit to the side unless you are pointing straight north/south/east/west.
This was more of a "and if weston is what I should be using, here's where I'm currently stuck" kind of thing, but you already made clear that weston was the wrong path to take. :-)
Thank you for the pointer, too! I had been checking the general Wacom docs but completely missed that they have a Wayland section. This answers some of my questions. |
Completed via #8058 |
This is somewhat a regression that happened due to #4306.
Previously, XWayland would make use of this
tablet-unstable-v2
API and expose it as a "normal" xcursor, to provide compatibility for X applications written with xf86-input-wacom in mind. This worked for SDL with X videodriver, too, since that was just the "normal" xcursor, and the special digitizer data (pressure, tilt, etc) was seperate.However with the switch to Wayland by default, I've noticed my tablet not working anymore in osu!lazer because GNOMEs Mutter compositor only exposes pen tablets under this separate
tablet-unstable-v2
API (wlroots/sway still works, they probably don't or just for applications also supporting it).I've already tried hacking a (somewhat working) tablet-unstable-v2 support together: sp1ritCS@fd2edf0
Because sdl doesn't have a native "tablet/pen input" interface, I made it send absolute mouse input events instead.
but it's still far from ready (and since I've never written SDL code before, I doubt it meets your quality expectations 🙃 ):
all of those are irrelevant to osu!lazer (since it's fullscreen and has a custom cursor thingy), but they are clearly noticeable in other applications, like the sdl2-demo I've been testing against.
The text was updated successfully, but these errors were encountered: