diff --git a/include/wx/window.h b/include/wx/window.h index 38d70ab7a8..8046223a4a 100644 --- a/include/wx/window.h +++ b/include/wx/window.h @@ -48,22 +48,6 @@ #define wxUSE_MENUS_NATIVE wxUSE_MENUS #endif // __WXUNIVERSAL__/!__WXUNIVERSAL__ - -// Define this macro if the corresponding operating system handles the state -// of children windows automatically when the parent is enabled/disabled. -// Otherwise wx itself must ensure that when the parent is disabled its -// children are disabled too, and their initial state is restored when the -// parent is enabled back. -#if defined(__WXMSW__) - // must do everything ourselves - #undef wxHAS_NATIVE_ENABLED_MANAGEMENT -#elif defined(__WXOSX__) - // must do everything ourselves - #undef wxHAS_NATIVE_ENABLED_MANAGEMENT -#else - #define wxHAS_NATIVE_ENABLED_MANAGEMENT -#endif - // ---------------------------------------------------------------------------- // forward declarations // ---------------------------------------------------------------------------- diff --git a/src/common/wincmn.cpp b/src/common/wincmn.cpp index f07acd465d..d398f1f7b0 100644 --- a/src/common/wincmn.cpp +++ b/src/common/wincmn.cpp @@ -1166,6 +1166,21 @@ bool wxWindowBase::IsEnabled() const return IsThisEnabled() && (IsTopLevel() || !GetParent() || GetParent()->IsEnabled()); } +// Define this macro if the corresponding operating system handles the state +// of children windows automatically when the parent is enabled/disabled. +// Otherwise wx itself must ensure that when the parent is disabled its +// children are disabled too, and their initial state is restored when the +// parent is enabled back. +#if defined(__WXMSW__) + // must do everything ourselves + #undef wxHAS_NATIVE_ENABLED_MANAGEMENT +#elif defined(__WXOSX__) + // must do everything ourselves + #undef wxHAS_NATIVE_ENABLED_MANAGEMENT +#else + #define wxHAS_NATIVE_ENABLED_MANAGEMENT +#endif + void wxWindowBase::NotifyWindowOnEnableChange(bool enabled) { // Under some platforms there is no need to update the window state