From 2fb15dbe8aecda68026688a82b6db003f8ba00c8 Mon Sep 17 00:00:00 2001 From: Amr Bashir Date: Thu, 20 Oct 2022 17:59:12 +0200 Subject: [PATCH] Fix menubar focus using `Alt` on Windows (#2521) --- CHANGELOG.md | 1 + src/platform_impl/windows/event_loop.rs | 6 +++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5d73e0fb..954d4f80 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ And please only add new entries to the top of this list, right below the `# Unre # Unreleased +- On Windows, fix focusing menubar when pressing `Alt`. - On MacOS, made `accepts_first_mouse` configurable. - Migrated `WindowBuilderExtUnix::with_resize_increments` to `WindowBuilder`. - Added `Window::resize_increments`/`Window::set_resize_increments` to update resize increments at runtime for X11/macOS. diff --git a/src/platform_impl/windows/event_loop.rs b/src/platform_impl/windows/event_loop.rs index a5baf131..1cf45224 100644 --- a/src/platform_impl/windows/event_loop.rs +++ b/src/platform_impl/windows/event_loop.rs @@ -1537,7 +1537,11 @@ unsafe fn public_window_callback_inner( }, }); } - 0 + if msg == WM_SYSKEYUP { + DefWindowProcW(window, msg, wparam, lparam) + } else { + 0 + } } WM_LBUTTONDOWN => {