gpui: Reset mouse scroll state on FocusOut to prevent large jumps (#43841)
This fixes an X11 scrolling issue where Zed may jump by a large amount
due to the scroll valuator state not being reset when the window loses
focus. If you Alt-Tab away from Zed, scroll in another application, then
return, the first scroll event in Zed applies the entire accumulated
delta instead of a single step.
The missing FocusOut reset was originally identified in issue #34901.
Resetting scroll positions on FocusOut matches the behavior already
implemented in the XinputLeave handler and prevents this jump.
Closes #34901
Closes #40538
Release Notes:
- Fixed an X11 issue where Alt-Tabbing to another application,
scrolling, and returning to Zed could cause the next scroll event to
jump by a large amount.
e5eb26e8d6jkugs committed on 12/20/2025, 12:29:44 AM· committed by GitHubparenta86b0ab