Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

macOS: Fix mouse scrolling without OS window focus #4371

merged 1 commit into from Dec 17, 2021


Copy link

Under macOS, when kitty has no focus, the mouse cursor coordinates are not updated when the mouse moves over the window. In this case, the mouse scroll event uses the last activated kitty window, not the one pointed by the mouse.

This PR solves the issue.
When OS window has no focus, update the current mouse cursor position first when handling the scroll event, and then check the window under the mouse cursor.

Tested on macOS and Linux. Hopefully no other issues have been introduced. If you have better ideas please let me know, thanks.

Previously discussed in:

#4367 (comment)

@kovidgoyal kovidgoyal merged commit 0c4bd96 into kovidgoyal:master Dec 17, 2021
@page-down page-down deleted the fix-mouse-scroll branch December 17, 2021 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
None yet

Successfully merging this pull request may close these issues.

None yet

2 participants