Hyprland
Hyprland copied to clipboard
Better Touch Implementation
As things are now, Hyprland presents a vary basic touch implementation. On 2in1 laptops you can use single touch and multitouch, as when you scroll (and zoom) firefox or navigate through the timeline in mpv, but that's about it. For some reason, "overlays" (sorry, unfortunately I don't know their technical name) as waybar and the bitwarden pop up in firefox are untouchable: they "see" they see the cursor on top of them, but instead of the element that the cursor is sitting on top being selected, the area beneath them is. For example: on firefox, if I try to open Bitwarden's applet and to select one of my logins, instead the underneath "Fork" button of github is selected. And even when using touch to control firefox, the mouse's cursor remains always visible, and when multitouching there are some strange artifacts. On gnome, kde and sway the issue isn't present.
Sorry for this long comment.
the firefox issue should be fixed in c5a4c83f78308ae3cef5d60626086611e033d4ed
Ah, another "problem". The touch panel is "relative" to the focused window. So if i touch my laptop's screen while having the cursor on a window resident on my laptop's screen (eDP-1) the touch will fonction as it should, but if the cursor is on the external screen then the touch input will go there, and that's kinda annoying..
GNU and touch don't usually mix, there are almost* no desktop Linux Wayland** or X solutions for single touch scrolling or pinch zoom. These are per-application based solutions built-in to MPV and Firefox. Touch would have to be built into gtk, qt, your compositor, and everything else to work as expected, and I doubt this would ever happen. If you really want to touch Linux, use Android.
*One abandoned Compiz project from 2009 **Ubuntu Touch and Plasma Mobile may use Wayland, and an app environment in which every application is built for touch, and it therefore works as expected, but these apps are heavily reliant on custom KDE and Gnome dependencies, that haven't all been ported to x86.
GNU and touch don't usually mix, there are almost* no desktop Linux Wayland** or X solutions for single touch scrolling or pinch zoom. These are per-application based solutions built-in to MPV and Firefox. Touch would have to be built into gtk, qt, your compositor, and everything else to work as expected, and I doubt this would ever happen. If you really want to touch Linux, use Android.
*One abandoned Compiz project from 2009 **Ubuntu Touch and Plasma Mobile may use Wayland, and an app environment in which every application is built for touch, and it therefore works as expected, but these apps are heavily reliant on custom KDE and Gnome dependencies, that haven't all been ported to x86.
Thank you for your reply. Now I'm gonna install Android x86 on my $2k laptop, sure. Btw, touch already works great on GTK and QT apps: scrolling, pinching to zoom ecc are working as expected.
Anyway, a little update on the issues I have been encountering and maybe some advice for the others that'll see this issue: If having the cursor while touching your screen bothers you, try setting "general:cursor_inactive_timeout = 5"; this will hide your cursor after 5 seconds of inactivity so if you browse a page with your mouse then touch the screen there shouldn't be any cursors. In the wiki there's a mention that "input:touchdevice {output=eDP-1}" should bind the touch panel to your laptop's monitor so that it won't ever function as the touch input to another monitor; but that didn't work for me and issues were still happening sometimes. If you can't click your waybar icons try setting "layer" : "top" in your config.jsonc, that should solve it.
Dragging items remain a dream trough; as it is having touch gestures.
I'm wondering if I should mark this issue as completed.
I'll close this as all the points in the original issue are fixed (as far as I am aware)
GNU and touch don't usually mix, Touch would have to be built into gtk
Gtk does have touch, see this class and it~s descendants: https://docs.gtk.org/gtk4/class.Gesture.html