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

feat: implement the X Input extension to support touch input, smooth scrolling, etc. #15799

Merged
merged 15 commits into from
Oct 14, 2024

Conversation

ramezgerges
Copy link
Contributor

@ramezgerges ramezgerges commented Mar 7, 2024

GitHub Issue (If applicable): closes https://github.com/unoplatform/uno-private/issues/409, closes #17912, closes #16804

PR Type

What kind of change does this PR introduce?

What is the current behavior?

What is the new behavior?

PR Checklist

Please check if your PR fulfills the following requirements:

Other information

Internal Issue (If applicable):

@github-actions github-actions bot added the area/skia ✏️ Categorizes an issue or PR as relevant to Skia label Mar 7, 2024
@unodevops
Copy link
Contributor

🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-15799/index.html

@unodevops
Copy link
Contributor

🤖 Your WebAssembly Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-15799/index.html

@jeromelaban jeromelaban requested a review from dr1rrb March 27, 2024 12:50
@jeromelaban
Copy link
Member

@ramezgerges other than the rebase, is there anything missing in this PR? Once it is, I'll test it on actual hardware.

@ramezgerges
Copy link
Contributor Author

@jeromelaban There's nothing that I plan to add, no. But considering I haven't tested touch at all, the PR will probably have some stuff "missing.

@unodevops
Copy link
Contributor

🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-15799/index.html

1 similar comment
@unodevops
Copy link
Contributor

🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-15799/index.html

@unodevops
Copy link
Contributor

🤖 Your WebAssembly Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-15799/index.html

@unodevops
Copy link
Contributor

🤖 Your WebAssembly Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-15799/index.html

@unodevops
Copy link
Contributor

🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-15799/index.html

@jeromelaban
Copy link
Member

@ramezgerges could you resolve the conflicts? Thanks!

@jeromelaban jeromelaban marked this pull request as draft June 13, 2024 19:05
@lindexi
Copy link
Contributor

lindexi commented Jun 29, 2024

My version of X input support: https://github.com/lindexi/uno/blob/f2f4d7980fcbf3cef4cbd4a56172e0cb1121aa74/src/Uno.UI.Runtime.Skia.X11/X11PointerInputSource.XInput.cs

I tested the code on a touch device and it passed.

But there are some points worth discussing:

  1. Within XInput, the size of touch is no longer represented by width and height, but by the long and short axes of an ellipse.
  2. Is there a need to perform DPI scaling calculations for width and height?
  3. In XInput, if there is no change in the size of touch and pressure sensitivity, no values will be received. It may be necessary to use the data from the previous touch event at the lower level. Currently, my approach is to return a default value of 0 when no values are received.

@lindexi
Copy link
Contributor

lindexi commented Jul 16, 2024

Update:

I reimplemente the X11PointerInputSource.XInput.cs to make it to support GetIntermediatePoints, which can alleviates the problem of input message stacking.

See https://github.com/lindexi/uno/blob/218e2016093af8523a1ad2b54cd169d20da09722/src/Uno.UI.Runtime.Skia.X11/X11PointerInputSource.XInput.cs#L277

Reference: #17527

@lindexi
Copy link
Contributor

lindexi commented Jul 24, 2024

@jeromelaban Sorry to be pushing, can I know any update here?

@unodevops
Copy link
Contributor

🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-15799/index.html

1 similar comment
@unodevops
Copy link
Contributor

🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-15799/index.html

@unodevops
Copy link
Contributor

🤖 Your WebAssembly Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-15799/index.html

1 similar comment
@unodevops
Copy link
Contributor

🤖 Your WebAssembly Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-15799/index.html

@HakanL
Copy link

HakanL commented Aug 14, 2024

@ramezgerges I've never used custom-built/debug Uno SDK before, but if you want me to try your changes please let me know and I'll figure it out.

@unodevops
Copy link
Contributor

🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-15799/index.html

@unodevops
Copy link
Contributor

🤖 Your WebAssembly Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-15799/index.html

@unodevops
Copy link
Contributor

🤖 Your WebAssembly Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-15799/index.html

@unodevops
Copy link
Contributor

🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-15799/index.html

@MartinZikmund MartinZikmund marked this pull request as ready for review October 14, 2024 08:41
@unodevops
Copy link
Contributor

🤖 Your Docs stage site is ready! Visit it here: https://unodocsprstaging.z13.web.core.windows.net/pr-15799/index.html

@unodevops
Copy link
Contributor

🤖 Your WebAssembly Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-15799/index.html

@ramezgerges
Copy link
Contributor Author

Thanks @lindexi for your insights with this PR.

@ramezgerges ramezgerges merged commit 9a8e127 into unoplatform:master Oct 14, 2024
106 checks passed
@HakanL
Copy link

HakanL commented Oct 14, 2024

Excited to see this merged in! Can you comment on which Nuget pre-release package versions I can find this in to do some tests?

@ramezgerges ramezgerges deleted the x_input branch October 14, 2024 20:59
@ramezgerges
Copy link
Contributor Author

@HakanL It hasn't been automatically published yet, but it should be soon. The current latest sdk version on nuget.org is 5.6.0-dev.10, so most likely the first version after that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/skia ✏️ Categorizes an issue or PR as relevant to Skia
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[X11] Scroll using touch screen isn't working [Skia.X11] Multi-Touch support
6 participants