HumbleUI / JWM

Cross-platform window management and OS integration library for Java
Apache License 2.0
546 stars 44 forks source link

X11: Clear all scroll valuators on XI_Enter #247

Closed dzaima closed 1 year ago

dzaima commented 1 year ago

My previous X11 PR (#244) introduced an issue where tabbing out & back into a window didn't clear the scroll valuator (just moving mouse out & in did work, which is what I had tested). I don't see a way to clear them precisely here, as neither the sourceid nor deviceid is the ID that stores the valuator, without introducing a map from device to source IDs, so this patch just clears all unconditionally.

Given that the IDs are the same between multiple JWM windows (at least on my Linux Mint 21 system), I don't think this should affect anything either.

tonsky commented 1 year ago

I won’t pretend I understand what’s going on, so hopefully it fixes something for you :) Thanks!

dzaima commented 1 year ago

I won't pretend to understand much of what's going on either; X11 is weird, badly documented, and in general a pain to work with, but I want JWM to work well on it so I'm trying my best.

tonsky commented 1 year ago

Thank you for that, it wouldn’t be as good without your help!