From 48bf2e09ae82ce7fe57666401131c28750d7c7f3 Mon Sep 17 00:00:00 2001 From: guy-bartkus Date: Wed, 7 Aug 2024 10:03:00 -0700 Subject: [PATCH] Add mouse button 4 and 5 support --- src/native/windows.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/native/windows.rs b/src/native/windows.rs index c144d805..af864909 100644 --- a/src/native/windows.rs +++ b/src/native/windows.rs @@ -367,7 +367,7 @@ unsafe extern "system" fn win32_wndproc( WM_XBUTTONDOWN => { let mouse_x = payload.mouse_x; let mouse_y = payload.mouse_y; - let xbutton: u8 = GET_XBUTTON_WPARAM(wparam) as u8; + let xbutton = GET_XBUTTON_WPARAM(wparam) as u8; let which = MouseButton::try_from(xbutton+2); event_handler.mouse_button_down_event(which.unwrap(), mouse_x, mouse_y); @@ -393,7 +393,7 @@ unsafe extern "system" fn win32_wndproc( WM_XBUTTONUP => { let mouse_x = payload.mouse_x; let mouse_y = payload.mouse_y; - let xbutton: u8 = GET_XBUTTON_WPARAM(wparam) as u8; + let xbutton = GET_XBUTTON_WPARAM(wparam) as u8; let which = MouseButton::try_from(xbutton+2); event_handler.mouse_button_up_event(which.unwrap(), mouse_x, mouse_y);