From 91c171685847b52202da1f33554d2f0a1cd8161c Mon Sep 17 00:00:00 2001 From: LoganDark Date: Wed, 8 May 2024 10:56:31 -0700 Subject: [PATCH] Fix horizontal scrolling direction on Windows (#11520) As per Microsoft documentation, positive values scroll right, not left. GPUI was incorrectly assuming it perfectly mirrored vertical scrolling. Fixes #11515 Release Notes: - N/A --- crates/gpui/src/platform/windows/events.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/gpui/src/platform/windows/events.rs b/crates/gpui/src/platform/windows/events.rs index 7ae1607210..22b42d7995 100644 --- a/crates/gpui/src/platform/windows/events.rs +++ b/crates/gpui/src/platform/windows/events.rs @@ -547,7 +547,7 @@ fn handle_mouse_horizontal_wheel_msg( let wheel_scroll_chars = lock.mouse_wheel_settings.wheel_scroll_chars; drop(lock); let wheel_distance = - (wparam.signed_hiword() as f32 / WHEEL_DELTA as f32) * wheel_scroll_chars as f32; + (-wparam.signed_hiword() as f32 / WHEEL_DELTA as f32) * wheel_scroll_chars as f32; let mut cursor_point = POINT { x: lparam.signed_loword().into(), y: lparam.signed_hiword().into(),