X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3bce6687f47dfa5fb8d4bab92702a5b5b1eb3485..aa6ca3dcc9ad03a973dc6fc80e9c66c408b2c27d:/src/msw/window.cpp diff --git a/src/msw/window.cpp b/src/msw/window.cpp index 5186088642..07d4a17190 100644 --- a/src/msw/window.cpp +++ b/src/msw/window.cpp @@ -502,6 +502,12 @@ bool wxWindowMSW::Enable(bool enable) if ( hWnd ) ::EnableWindow(hWnd, (BOOL)enable); + // the logic below doesn't apply to the top level windows -- otherwise + // showing a modal dialog would result in total greying out (and ungreying + // out later) of everything which would be really ugly + if ( IsTopLevel() ) + return TRUE; + // when the parent is disabled, all of its children should be disabled as // well but when it is enabled back, only those of the children which // hadn't been already disabled in the beginning should be enabled again,