]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/app.cpp
compilation fixes
[wxWidgets.git] / src / msw / app.cpp
index 5cbf84c3b7825b8fcecf5c50a2399b525205af58..6277236d8e2e7fb87aee80d569c44acc24794286 100644 (file)
@@ -86,7 +86,7 @@
 #include <string.h>
 #include <ctype.h>
 
-#if defined(__WIN95__) && !(defined(__GNUWIN32_OLD__) || defined(__TWIN32__))
+#if defined(__WIN95__) && !((defined(__GNUWIN32_OLD__) || defined(__TWIN32__)) && !defined(__CYGWIN10__))
     #include <commctrl.h>
 #endif
 
@@ -1061,23 +1061,19 @@ bool wxApp::ProcessMessage(WXMSG *wxmsg)
     // a translation table.
     wxWindow *wnd;
 
+    bool pastTopLevelWindow = FALSE;
     for ( wnd = wndThis; wnd; wnd = wnd->GetParent() )
     {
-        if ( wnd->MSWTranslateMessage(wxmsg) )
+        if ( !pastTopLevelWindow && wnd->MSWTranslateMessage(wxmsg))
+            return TRUE;
+        if ( wnd->MSWProcessMessage(wxmsg) )
             return TRUE;
 
         // stop at first top level window, i.e. don't try to process the key
         // strokes originating in a dialog using the accelerators of the parent
         // frame - this doesn't make much sense
         if ( wnd->IsTopLevel() )
-            break;
-    }
-
-    // Anyone for a non-translation message? Try youngest descendants first.
-    for ( wnd = wndThis; wnd; wnd = wnd->GetParent() )
-    {
-        if ( wnd->MSWProcessMessage(wxmsg) )
-            return TRUE;
+            pastTopLevelWindow = TRUE;
     }
 
     return FALSE;