From 2dddf480710822f05c61d3d247d5fcc3f5c0f982 Mon Sep 17 00:00:00 2001 From: Ahmed Arif Date: Mon, 8 Jun 2026 23:59:52 +0200 Subject: [PATCH] [NTUSER] Use MOUSEEVENTF_XDOWN/XUP in the X-button flush checks (#9122) This fixes the mismatch, where the flush checks wrongly tested `mi.dwFlags` (`MOUSEEVENTF_XDOWN/XUP`) against the raw `MOUSE_BUTTON_4/5` bits, so the combined button-4+5 events were flushed in the wrong block or were dropped. --- win32ss/user/ntuser/mouse.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/win32ss/user/ntuser/mouse.c b/win32ss/user/ntuser/mouse.c index bdc626094ce..d41e9ac2748 100644 --- a/win32ss/user/ntuser/mouse.c +++ b/win32ss/user/ntuser/mouse.c @@ -92,7 +92,7 @@ UserProcessMouseInput(PMOUSE_INPUT_DATA mid) } /* If mouseData is used by button 4, send input and clear mi */ - if (mi.dwFlags & (MOUSE_BUTTON_4_DOWN | MOUSE_BUTTON_4_UP)) + if (mi.dwFlags & (MOUSEEVENTF_XDOWN | MOUSEEVENTF_XUP)) { UserSendMouseInput(&mi, FALSE); RtlZeroMemory(&mi, sizeof(mi)); @@ -111,7 +111,7 @@ UserProcessMouseInput(PMOUSE_INPUT_DATA mid) } /* If mouseData is used by button 5, send input and clear mi */ - if (mi.dwFlags & (MOUSE_BUTTON_5_DOWN | MOUSE_BUTTON_5_UP)) + if (mi.dwFlags & (MOUSEEVENTF_XDOWN | MOUSEEVENTF_XUP)) { UserSendMouseInput(&mi, FALSE); RtlZeroMemory(&mi, sizeof(mi));