Open arzeth opened 1 month ago
With your config, holding KP_5 sends button presses repeatedly, while on release only one event is sent. Before 8730ca9661eaaab83954bca033745b65c60cf4f8, wlroots stored pressed buttons for a wl_seat
as a set, meaning that if you pressed two (same code) buttons on different devices and then released only one, you'd get a release event despite another button still pressed.
Now pressed buttons are stored as a multiset, and so sending repeated "press" events makes wlroots think the same button is being pressed multiple times and refuse to send ~duplicate~ "early" release events to clients.
Adding --no-repeat
to "press" bindings fixes the issue.
@emersion Not exactly sure how to improve user experience with this. Mention the pitfall in sway(5)
?
I can confirm the same issue on my laptop with sway-git 1.10.r7386.32e5e52 and wlroots-git 0.19.0.r7160.8730ca966-1. That said, right-clicking works fine.
edit: I don't have anything in my config like mentioned in the issue.
If you don't have cursor press/release
commands in your config, it's most likely a separate/unrelated one.
Thanks for having a look @vyivel. I agree there's probably not much to be done here besides docs.
Maybe a better approach would be to add support for pointer keysyms: https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3803
Same issue, but I haven't a specific config for my mouse (check my dotfiles if you see anything :shrug:)
@ventureoo @Riptils your issue is unrelated to this issue, most likely it's fixed by https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4777
Sway Version:
sway version 1.10-dev-951a22c24 (Aug 8 2024, branch 'master')
wlroots Version: the latest (14446216f446d26ce42f043823af50915243deb6)
I mostly use numpad to control a mouse.
Step 1: Add this to config
Step 2: Reload the config:
swaymsg reload
Step 2: Hold "5" (left click) or "*" (right click) on the numpad for 2 seconds. Stop holding it.
Step 3: Sway continues to think that the left/right mouse button is still being pressed. THOUGH, for some reason, clicking on window titles in the top bar still works (I mean I have
bindsym $mod+w layout tabbed
, then press Win+W).Switching between ttys, reconnecting the mouse, or suspending/unsuspending the PC doesn't help (it doesn't reset the mouse state).
I did
git revert 8730ca9661eaaab83954bca033745b65c60cf4f8
in wlroots, then recompiled wlroots and then sway, now it works fine.wlroots'
8730ca9661eaaab83954bca033745b65c60cf4f8
"seat/pointer: handle duplicate presses/releases correctly" https://gitlab.freedesktop.org/wlroots/wlroots/-/commit/8730ca9661eaaab83954bca033745b65c60cf4f8 is by @vyivel