pop-os / cosmic-panel

WIP
GNU General Public License v3.0
105 stars 19 forks source link

WIP Support for touch input #199

Open ids1024 opened 2 months ago

ids1024 commented 2 months ago

Requires https://github.com/pop-os/xdg-shell-wrapper/pull/22.

Seems to be working now. And panel applets already support touch, since it was added to iced-sctk.

I want to see if update_pointer and this touch_under can be cleanup up and deduplicated a bit though... as well as a bit more testing.

wash2 commented 2 months ago

This looks pretty good to me. I'm not sure how touch should be handled for auto-hiding panels though, and also stacked auto-hiding panels, which are a bit complicated. We might want to add a method to the space trait for down / up, that can be used like how enter / leave are used.

ids1024 commented 2 months ago

Yeah. For auto-hiding panels, probably touches within a certain number of pixels of the edge of the screen should show the panel, but I'm not sure there's a way to do that without having a surface that will also intercept mouse events? Instead of letting them go to the window behind the dock.

Edit: I assume we can't reliably detect a swipe from a screen edge handling touches just on a border 1 px wide. At least not on all screens.