]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/wincmn.cpp
fixing param
[wxWidgets.git] / src / common / wincmn.cpp
index 013f3b2a4bd9e24dd29c1eb306807fb99cf3dc7b..44fc1783691c3a38fdec3f704c5a0915c6d53357 100644 (file)
@@ -474,7 +474,7 @@ void wxWindowBase::FitInside()
 }
 
 // On Mac, scrollbars are explicitly children.
-#ifdef __WXMAC__
+#if defined( __WXMAC__ ) && !defined(__WXUNIVERSAL__)
 static bool wxHasRealChildren(const wxWindowBase* win)
 {
     int realChildCount = 0;
@@ -550,7 +550,7 @@ wxSize wxWindowBase::DoGetBestSize() const
     }
 #endif // wxUSE_CONSTRAINTS
     else if ( !GetChildren().empty()
-#ifdef __WXMAC__
+#if defined( __WXMAC__ ) && !defined(__WXUNIVERSAL__)
               && wxHasRealChildren(this)
 #endif
               )
@@ -1152,19 +1152,22 @@ void wxWindowBase::PushEventHandler(wxEvtHandler *handlerToPush)
 
     SetEventHandler(handlerToPush);
 
-#ifdef __WXDEBUG__
+#if wxDEBUG_LEVEL
     // final checks of the operations done above:
     wxASSERT_MSG( handlerToPush->GetPreviousHandler() == NULL,
-        "the first handler of the wxWindow stack should have no previous handlers set" );
+        "the first handler of the wxWindow stack should "
+        "have no previous handlers set" );
     wxASSERT_MSG( handlerToPush->GetNextHandler() != NULL,
-        "the first handler of the wxWindow stack should have non-NULL next handler" );
+        "the first handler of the wxWindow stack should "
+        "have non-NULL next handler" );
 
     wxEvtHandler* pLast = handlerToPush;
-    while (pLast && pLast != this)
+    while ( pLast && pLast != this )
         pLast = pLast->GetNextHandler();
     wxASSERT_MSG( pLast->GetNextHandler() == NULL,
-        "the last handler of the wxWindow stack should have this window as next handler" );
-#endif
+        "the last handler of the wxWindow stack should "
+        "have this window as next handler" );
+#endif // wxDEBUG_LEVEL
 }
 
 wxEvtHandler *wxWindowBase::PopEventHandler(bool deleteHandler)
@@ -2861,7 +2864,7 @@ bool wxWindowBase::UnregisterHotKey(int WXUNUSED(hotkeyId))
 // event processing
 // ----------------------------------------------------------------------------
 
-bool wxWindowBase::TryValidator(wxEvent& wxVALIDATOR_PARAM(event))
+bool wxWindowBase::TryBefore(wxEvent& event)
 {
 #if wxUSE_VALIDATORS
     // Can only use the validator of the window which
@@ -2876,10 +2879,10 @@ bool wxWindowBase::TryValidator(wxEvent& wxVALIDATOR_PARAM(event))
     }
 #endif // wxUSE_VALIDATORS
 
-    return false;
+    return wxEvtHandler::TryBefore(event);
 }
 
-bool wxWindowBase::TryParent(wxEvent& event)
+bool wxWindowBase::TryAfter(wxEvent& event)
 {
     // carry on up the parent-child hierarchy if the propagation count hasn't
     // reached zero yet
@@ -2901,7 +2904,7 @@ bool wxWindowBase::TryParent(wxEvent& event)
         }
     }
 
-    return wxEvtHandler::TryParent(event);
+    return wxEvtHandler::TryAfter(event);
 }
 
 // ----------------------------------------------------------------------------