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

[Masonry] Implement unified PointerEvent #312

Open
xorgy opened this issue May 22, 2024 · 1 comment
Open

[Masonry] Implement unified PointerEvent #312

xorgy opened this issue May 22, 2024 · 1 comment
Labels
masonry Issues relating to the Masonry widget layer

Comments

@xorgy
Copy link
Member

xorgy commented May 22, 2024

There is some consensus that a PointerEvent-style API (like existed in Glazier) is probably a good way to handle touch and mouse in general. This is a tracking issue for that topic.

@raphlinus
Copy link
Contributor

There are a few layers to this. The simplest layer is just to enable mouse-like behavior from touch, so that touch can operate widgets like buttons and sliders, and also selection (and focus) in text input.

Another more sophisticated layer is to support multi-touch well. That has potentially far-reaching changes, as multiple widgets can be active at the same time. A careful design is needed.

And yet another more sophisticated layer is gesture disambiguation and recognition. A touch-drag gesture on a slider widget should move the slider, but on mobile, the same gesture not on a suitably sensitive widget should be interpreted as a scroll. There may be platform-specific gesture recognition code we want to call into, or it may be that we want a pure Rust cross-platform implementation of all this, tunable to feel native on the specific platform.

There may also be improvements desired on the winit side. I see a bunch of PRs to add pen support (rust-windowing/winit#2647 is the most recent) but they seem to be stuck in review. rust-windowing/winit#99 seems to be the main tracking issue there.

To be clear, I think we should have the simplest layer first, so we can unblock simple UI interactions on mobile, then carefully design what we want to do for the other two.

@flosse flosse added the masonry Issues relating to the Masonry widget layer label Aug 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
masonry Issues relating to the Masonry widget layer
Projects
None yet
Development

No branches or pull requests

3 participants