Skip to content

Conversation

@flabbet
Copy link
Contributor

@flabbet flabbet commented Oct 24, 2025

What does the pull request do?

This PR adds support for Pressure TwistX and TwistY for X11 platform inside Move, Press and Release events.

What is the current behavior?

Avalonia on Linux never reports Pen as pointer type and does not set Pressure and Twist properties in mentioned pointer events.

How was the solution implemented (if it's not obvious)?

Pressure and Twist events are simple atomics, I only added a few fields and read from evaluators. Pointer Type is determined based on presence of these evaluators.

I couldn't find information about Twist anywhere, my tablet (Huion H950P) doesn't seem to report it, or at least not without any additional drivers (no evaluator with relevant data is present).

While this PR does not provide full API (back eraser detection, twist), it's already better than having nothing on Linux. I'd be more than happy to implement missing elements.

  • Twist: I'd need an information about Twist evaluator name and value range provided by their tablet.

  • Back Eraser: I'd need a small hint where should I implement it, it's not part of RawPointerEvent, but processed PointerEventProperties, not sure where it is handled. I can then try implementing detection based on device name as mentioned in [X11] Some WACOM tablets are not supported #18873. My hardware doesn't support it, but the principle is simple enough to implement dry, then someone could confirm if it works properly.

  • Barrel buttons: Also, I'd use a hint where it is implemented too.

Checklist

Breaking changes

Obsoletions / Deprecations

Fixed issues

#18873

@avaloniaui-bot
Copy link

You can test this PR using the following package version. 12.0.999-cibuild0059559-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@avaloniaui-bot
Copy link

You can test this PR using the following package version. 12.0.999-cibuild0059576-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@MrJul MrJul added feature area-x11 backport-candidate-11.3.x Consider this PR for backporting to 11.3 branch labels Oct 28, 2025
@avaloniaui-bot
Copy link

You can test this PR using the following package version. 12.0.999-cibuild0059676-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

@avaloniaui-bot
Copy link

You can test this PR using the following package version. 12.0.999-cibuild0059820-alpha. (feed url: https://nuget-feed-all.avaloniaui.net/v3/index.json) [PRBUILDID]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-x11 backport-candidate-11.3.x Consider this PR for backporting to 11.3 branch feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants