Open nine7nine opened 7 months ago
Yes, I forgot that touch input events have a separate protocol. This would be easy to fix, I just had to add touch event hooks and call the corresponding input function. Since the plugin hooks into swipe event, touch gestures could be fixed with hyprgrass as it emulates swipe event.
Yeah, I use hyprgrass for gestures / swipes -> but obviously that has nothing to do with actual point-click single touch, which is the more basic bit that needs to be handled in Hyprspace.
Sorry I'm bogged down with other stuff recently. See https://github.com/KZDKM/Hyprspace/commit/2203e5844167a73a8ea9cd7df41eaeed8c700df4.
This is untested as I do not have touchscreen to test it with right now. Please report whether if the implementation works.
no worries at all!
I'll give your commit a whirl, tonight -- when I am home.
So I tested this -- it doesn't appear to work. However, I am wondering if it may actually be an issue in Hyprland.
Hyprland handles touch in a funny way / non-parity with mouse/click events.
For example: If i have 2 floating windows in Hyprland
A touch event will make the window active, but will NOT change the z order bring it to the front.
So I am not positive that your implementation isn't working or is wrong -- it may be an issue with how Hyprland is handling the touch events, itself. ~ I will file an issue about it.
I just realized that the touch coordinate sent through the touch event should be scaled by monitor's size. The newest commit should fix it. However, a recent change was introduced in hyprland git that broke compatibility with older versions, so to test it you have to change to hyprland-git.
Hyprland handles touch in a funny way / non-parity with mouse/click events.
Indeed, however this is to be expected as any-half decent touch input system implementation should not simply emulate mouse clicks.
I'll give it a whirl and let you know... and yeah, no worries: I'm using hyprland-git / I'm aware of the registerCallbackDynamic() breaking API change.
Agreed, that it shoudn't emulate mouse clicks -- but at the same time, in the example I gave; hyprland clearly is actually doing the wrong thing. a touch event SHOULD affect the z order / bring the active window to the front.
Any possibility this is still on the scope? Found a similar/related issue on hyprgrass, not sure what the current touchscreen support scopt is like (touch still broken for me on arch + thinkpad T480s).
Relevant thread in hyprgrass here
I can confirm that on Hyprland 0.45.0 with the hyprgrass and hyprspace plugins installed, this can be done by assigning a longpress to movewindow in hypgrass and using that same gesture in the overview, which also has touch support fixed. There isn't a way to scroll through workspaces with a touchscreen currently, but it is still mostly usable with only touch input unless I use too many workspaces which need to be scrolled through.
Hey @KZDKM
It would be nice if Hyprspace had basic touch support. Not necessarily anything fancy like gestures, but at least the ability to do the following:
Currently, it doesn't register any input from touch events (which Hyprland does support). IIRC, Hyprland also does support touch gestures, but at least for me: I already have a 3 finger multi-touch gesture for toggling Hyprspace + the expanders (dead-space) in my Panel/Topbar trigger toggling it too, with a mouse/Stylus click or touch event....
In any case, it would be awesome if Hyprspace handled basic touch events, as sometimes I do use my device as a tablet (even sometimes without using my stylus).