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
20.4k stars 863 forks source link

Mouse scroll events are sent to wrong grouped window until the cursor is moved #3737

Open tchofy opened 11 months ago

tchofy commented 11 months ago

Hyprland Version

88b47dfa833db2d230a2d6e6bbbf92c69afbdc28

Bug or Regression?

Bug

Description

Similar to https://github.com/hyprwm/Hyprland/issues/3679, but for switching between grouped windows, if you switch between them without moving the cursor, scroll events are sent to the window that last had a cursor move while they were focused. Seems to only happen when native wayland windows are involved, switching from xwayland to xwayland works as intended, any other combinations and the bug happens.

How to reproduce

Set input:follow_mouse to anything but 0, open 2 scrollable windows, at least one of them being native wayland, switch between them without moving the cursor

Crash reports, logs, images, videos

Older video, but exact same behavior from https://github.com/hyprwm/Hyprland/issues/3679#issuecomment-1784132717

aakamenov commented 11 months ago

Using the same commit as OP, layer shell windows are affected too when switching workspaces. In the video I scroll over the workspace widget on my bar and the event is properly sent, changing the workspace. But then if I continue scrolling without moving the mouse, the scroll events are being sent to the terminal window instead. I have to move the mouse in order to able to use scroll on the bar again. The amount of open windows doesn't seem to affect anything though.

https://github.com/hyprwm/Hyprland/assets/29430447/216da488-3d31-4c77-8f78-74dbb0aec836

tchofy commented 11 months ago

I've just noticed, it's not just scroll events, any mouse button clicks are also sent to the wrong window in my example until the cursor is moved.

hakan-demirli commented 11 months ago

Yea, same issue here:

❯ hyprctl version
Hyprland, built from branch main at commit c619e6976f8d7f9637b4bee098159935412c2e99 dirty (screencopy: round boxes).
Tag: v0.32.0-1-gc619e697

flags: (if any)
debug
Sophed commented 11 months ago

Same issue here, nothing particularly severe but just makes scrolling between workspaces feel janky

aakamenov commented 9 months ago

Fixed in #4306

tchofy commented 9 months ago

Can still replicate it sadly, exact same behavior. (For normal windows at least. Seems like the PR targets layershell)

hakan-demirli commented 7 months ago

I can no longer replicate this issue.

Hyprland, built from branch  at commit v0.35.0  ().
Date: 2024-02-05
tchofy commented 7 months ago

I can still replicate it on latest -git as of writing (4bff762d9733ba7334cd37b995cf51552cc80be0), exact same behavior. Maybe it was fixed in one of the commits and now the bug only triggers on specific configs.