Allow using ESC as accelerator in wxMSW again.

This ended up being broken due to an interplay between different unrelated
changes (at least r15120 and r41134) which were both correct, but didn't work
well together and resulted in not only preventing IsDialogMessage() from
handling ESC, but also our own accelerator tables.

Fix this by doing the check for IsDialogMessage() brokenness in
MSWProcessMessage() itself, just before calling it, instead of doing it in
MSWShouldPreProcessMessage() which is (and must be) called before
MSWTranslateMessage() which checks for accelerators using ESC.

Closes #3813.

[This is the backport of r77071 from trunk.]

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@77948 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2014-10-03 01:52:15 +00:00
parent 7d94e9fafd
commit cbc1dbab9a
3 changed files with 54 additions and 45 deletions

View File

@@ -682,6 +682,13 @@ private:
bool HandleJoystickEvent(WXUINT msg, int x, int y, WXUINT flags);
bool HandleNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result);
#ifndef __WXUNIVERSAL__
// Call ::IsDialogMessage() if it is safe to do it (i.e. if it's not going
// to hang or do something else stupid) with the given message, return true
// if the message was handled by it.
bool MSWSafeIsDialogMessage(WXMSG* msg);
#endif // __WXUNIVERSAL__
#if wxUSE_DEFERRED_SIZING
protected:
// this function is called after the window was resized to its new size