Open mattfbacon opened 1 year ago
This would be great! I think you need to start implementing it in winit
though if you want to have it in eframe
I'm just confused about how it all comes together. I know that libinput is capable of recognizing multitouch touchpads. However I also know that applications shouldn't use libinput and should get their events from the Wayland compositor. But it doesn't seem like the compositor has a way to send these events to the client, so I don't know how apps like Eye of Gnome and Firefox get the events.
BTW thanks for adding the feature request label. I couldn't set it properly. It's not a bug, of course.
This is also interesting for MacOS, where the "Magic" Trackpad, and the MacBook's builtin trackpad, sound to me they could be inputting these kinds of multi_touch events.
A lot of apple-native apps make use of it, so being able to use something like two-finger drags to drag something away, would be interesting to explore.
I think it would be possible to link https://wayland.app/protocols/pointer-gestures-unstable-v1 to https://docs.rs/winit/latest/winit/event/enum.WindowEvent.html#variant.TouchpadMagnify etc. I'll look into it.
Does egui support these winit events? Seems not based on the Event enum.
I noticed that egui has multi-touch support in the API via
InputState::multi_touch
. However I have not been able to produce any multi-touch events on my Linux laptop using libinput on sway.I saw in the initial issue and PR that it is more focused toward touchscreens rather than touchpads. However, in applications that support zooming and panning, a true multi-touch experience on a touchpad is great for UX. As such, I am wondering if egui (or eframe, not sure where the support for this has to go) could add support for multi-touch on touchpads.
I would be willing to implement this if someone more familiar with the organization of the codebase could tell me where to start.