djpohly / dwl

dwm for Wayland - ARCHIVE: development has moved to Codeberg
https://codeberg.org/dwl/dwl
Other
1.93k stars 284 forks source link

the mouse wheel does not respond sometimes, so you need to scroll it for a few more times. #489

Open DreamMaoMao opened 11 months ago

DreamMaoMao commented 11 months ago

Info

dwl version:0.4 wlroots version:0.16.2

Description

the mouse wheel does not respond sometimes, so you need to scroll it for a few more times. how can I to found out what'r going on.

DreamMaoMao commented 11 months ago

I found the problem. When the mouse moves, the scroll wheel event will not respond. It must be kept absolutely still for the mouse scroll wheel event to be effective

DreamMaoMao commented 11 months ago

Is there a way to detect both events at the same time?

DreamMaoMao commented 11 months ago

After testing, I found that this problem only exists in the xwayland window, I can use both mouse movement and scroll wheel on a pure wayland window at the same time.

DreamMaoMao commented 11 months ago

When I used xev-id to monitor a specific xwayland window, I found that the window received a scroll event when the mouse moved

I checked the output with hyprland and found it was consistent

However, when hyprland moves the mouse, the page can scroll when sliding the wheel, while dwl cannot scroll

I have no idea what's going on, why received the same event,dwl can't scroll the page, but hyprland can

sevz17 commented 11 months ago

Mmm, could you please test on sway?, I could read the code to see what's different from dwl (I don't know C++)

DreamMaoMao commented 11 months ago

Mmm, could you please test on sway?, I could read the code to see what's different from dwl (I don't know C++)

I just tested the latest source code on sway and sway doesn't have this problem, it just appears on dwl

DreamMaoMao commented 11 months ago

@sevz17 Hey bro, do you have any clue about this question,

sevz17 commented 11 months ago

Nope, I still have to look at sway code.

DreamMaoMao commented 11 months ago

@sevz17

image

I took a look at the source code for sway and found that the difference is this code.

if you comment this code,sway won't be able to use the scroll wheel when moving the mouse in the xwayland window

DreamMaoMao commented 11 months ago

ok i have fixed it. image

DreamMaoMao commented 10 months ago

This bug doesn't seem to be fixed in the main code, should I keep it open until it is fixed?

sevz17 commented 10 months ago

... should I keep it open until it is fixed?

Yes, please.

And thank you for pointing out the fix! For know you'll need to keep patching your dwl, (as we're discussing merging relative-pointer+pointer-constraints)