hyprwm / Hyprland

Hyprland is an independent, highly customizable, dynamic tiling Wayland compositor that doesn't sacrifice on its looks.
https://hyprland.org
BSD 3-Clause "New" or "Revised" License
21.64k stars 903 forks source link

Inverted touchpad buttons for XWayland apps #2573

Open mrkajetanp opened 1 year ago

mrkajetanp commented 1 year ago

Hi, just wanted to ask here in case I'm missing something because I couldn't find anything helpful online. I noticed a strange issue where the touchpad buttons on XWayland appear inverted compared to the ones on normal Wayland apps. Meaning: one finger tap/press -> LMB on Wayland, RMB on Xwayland double finger tap/press -> RMB on Wayland, LMB on Xwayland Has anyone seen that? Any idea where it could be fixed or reconfigured?

romanstingler commented 1 year ago

this doesn't happen to me and I haven't heard about that issue. what distro do you use.? you can try my configs https://github.com/romanstingler/dotfiles/blob/main/.config/hypr/hyprland.conf

mrkajetanp commented 1 year ago

I'm on Fedora 38, XWayland v22. The input section of my config looks pretty much the same as yours, if I make it 1:1 like yours the issue is still there. Not sure if it narrows it down but the issue isn't touchpad-exclusive, if I connect an external mouse the behaviour for XWayland apps is exactly the same.

Maybe we should just have an option to swap mouse buttons that could be switched on? I know it's possible on Xorg using libinput settings so it probably could be replicated here.

mrkajetanp commented 10 months ago

Bumping this since it's now been 6 months, all the packages have been updated but the issue is unfortunately still there. I've now put all this in my config:

touchpad {
    natural_scroll = true
    clickfinger_behavior = true
    middle_button_emulation = true
    tap-to-click = true
    tap_button_map = lrm
}

But same story - Wayland is fine, XWayland apps have LMB & RMB flipped. It's definitely the LMB & RMB issue because I confirmed by changing the tap button map to lmr - despite them now being a different touchpad gesture the LMB & RMB were still the other way around. Wayland Gnome works perfectly fine so it's a Hyprland-specific issue, @vaxerski any ideas? I have no idea how XWayland interacts with libinput through all this. Even just having an option to put an xwayland-specific config that'd flip the two buttons would fix the problem.

Roc327 commented 10 months ago

Same issue on my desktop, right and left click are reversed but so far that I have seen only for xwayland apps, it works as intended for wayland.

Also gnome and sway all work normal even with apps runngin in xwayland.

caughtquick commented 10 months ago

Just want to concur with this issue, my input config is even smaller

input {
    kb_layout = us

    follow_mouse = 1

}

I'm currently using xwayland-run and running my xwayland apps within it as a workaround, but that's obviously not a permanent solution.

mrkajetanp commented 9 months ago

xwayland-run makes it work fine for me as well - meaning there's just clearly a bug somewhere in how Hyprland sets up its own XWayland server/instances. @vaxerski still no idea where to look for what's causing this?

vaxerski commented 9 months ago

nope