From b1be34c6a040c643d3bd15193850ae2484743e39 Mon Sep 17 00:00:00 2001 From: Ssaely <32581789+Ssaely@users.noreply.github.com> Date: Sat, 6 Feb 2021 15:10:36 -0500 Subject: [PATCH] fix cursor blinking when clicking decorations bar on Windows (#1852) --- CHANGELOG.md | 1 + src/platform_impl/windows/event_loop.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 979fba4f..577ef59a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ # Unreleased - Added `is_maximized` method to `Window`. +- On Windows, fix bug where clicking the decoration bar would make the cursor blink. - On Windows, fix bug causing newly created windows to erroneously display the "wait" (spinning) cursor. - On Windows, change the default window size (1024x768) to match the default on other desktop platforms (800x600). - On Windows, fix bug causing mouse capture to not be released. diff --git a/src/platform_impl/windows/event_loop.rs b/src/platform_impl/windows/event_loop.rs index 022ce236..5b49cbe8 100644 --- a/src/platform_impl/windows/event_loop.rs +++ b/src/platform_impl/windows/event_loop.rs @@ -845,7 +845,7 @@ unsafe fn public_window_callback_inner( } winuser::WM_NCLBUTTONDOWN => { if wparam == winuser::HTCAPTION as _ { - winuser::PostMessageW(window, winuser::WM_MOUSEMOVE, 0, 0); + winuser::PostMessageW(window, winuser::WM_MOUSEMOVE, 0, lparam); } commctrl::DefSubclassProc(window, msg, wparam, lparam) }