X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/fd2eccd140ac70b80f4c92ab568a13628418622f..2d770c4f8204938933914a961d4142f97ec12f50:/src/msw/window.cpp diff --git a/src/msw/window.cpp b/src/msw/window.cpp index cd72c3c1e6..eee4ca18ad 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -2403,8 +2403,6 @@ bool wxWindowMSW::MSWProcessMessage(WXMSG* pMsg) // emulate the button click btn = wxFindWinFromHandle(msg->hwnd); } - - bProcess = false; } else // not a button itself, do we have default button? { @@ -2464,6 +2462,13 @@ bool wxWindowMSW::MSWProcessMessage(WXMSG* pMsg) return true; } + // This "Return" key press won't be actually used for + // navigation so don't generate wxNavigationKeyEvent + // for it but still pass it to IsDialogMessage() as it + // may handle it in some other way (e.g. by playing the + // default error sound). + bProcess = false; + #endif // wxUSE_BUTTON #ifdef __WXWINCE__