From: Vadim Zeitlin Date: Fri, 30 Jun 2006 22:59:01 +0000 (+0000) Subject: call MSWProcessMessage() for the window itself, although a comment said that this... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/f6388667682be59eb1f8bbcb82fd489889358aad call MSWProcessMessage() for the window itself, although a comment said that this was done it, in fact, wasn't (since rev 1.11 when this was changed, apparently accidentally) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39912 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/msw/evtloop.cpp b/src/msw/evtloop.cpp index c260f52ea2..37b2eba9a4 100644 --- a/src/msw/evtloop.cpp +++ b/src/msw/evtloop.cpp @@ -172,16 +172,14 @@ bool wxEventLoop::PreProcessMessage(WXMSG *msg) // now try the other hooks (kbd navigation is handled here) for ( wnd = wndThis; wnd; wnd = wnd->GetParent() ) { - if (wnd != wndThis) // Skip the first since wndThis->MSWProcessMessage() was called above - { - if ( wnd->MSWProcessMessage((WXMSG *)msg) ) - return true; - } + if ( wnd->MSWProcessMessage((WXMSG *)msg) ) + return true; - // Stop at first top level window (as per comment above). - // If we don't do this, pressing ESC on a modal dialog shown as child of a modal - // dialog with wxID_CANCEL will cause the parent dialog to be closed, for example - if (wnd->IsTopLevel()) + // also stop at first top level window here, just as above because + // if we don't do this, pressing ESC on a modal dialog shown as child + // of a modal dialog with wxID_CANCEL will cause the parent dialog to + // be closed, for example + if ( wnd->IsTopLevel() ) break; }