From d1175c00e19350df4db655c226ada91eada3e7a4 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 23 Jun 2018 23:46:10 +0200 Subject: [PATCH] Revert "Allow WM_SYSKEYDOWN to still be processed by MSWDefWindowProc, even if" This reverts commit e771b7e4ac5c7f73a579f7329ce15e2d6710670d. Don't always pass WM_SYSKEYDOWN to the system for processing as this can be undesirable: e.g. inside a dialog, any Alt-X key presses with X not being a mnemonic character result in a beep from IsDialogMessage(). Handle events for the system keys in the same way as for the normal ones, i.e. let the system process them only if they're not handled by the application. This is incompatible with the previous wxMSW behaviour, but compatible with the other ports and makes more sense, so it seems to be worth it, on balance. --- docs/changes.txt | 6 ++++++ src/msw/window.cpp | 2 -- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/docs/changes.txt b/docs/changes.txt index f3fed53b77..1335ef9c92 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -42,6 +42,12 @@ Changes in behaviour not resulting in compilation errors anymore and GetOrCreateAccessible() may return NULL, indicating that native system-provided accessibility should be used. +- wxMSW port doesn't always let the system process WM_SYSKEYDOWN events any + more, make sure to call event.Skip() in your wxEVT_KEY_DOWN and/or wxEVT_CHAR + event handlers if you want the standard key combinations such as Alt-Space or + Alt-F4 to work. + + Changes in behaviour which may result in build errors ----------------------------------------------------- diff --git a/src/msw/window.cpp b/src/msw/window.cpp index cd7e253ebe..8c3c961446 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -3258,8 +3258,6 @@ wxWindowMSW::MSWHandleMessage(WXLRESULT *result, processed = HandleWindowEvent(event); } } - if (message == WM_SYSKEYDOWN) // Let Windows still handle the SYSKEYs - processed = false; break; case WM_SYSKEYUP: