X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a579926062c74ef4e5ff2f1ddfbd60bbb43efed5..01cb1c26171efc494b94d77e4351362bb0eb2e7d:/src/os2/window.cpp diff --git a/src/os2/window.cpp b/src/os2/window.cpp index 2d3bee6535..d88927fcae 100644 --- a/src/os2/window.cpp +++ b/src/os2/window.cpp @@ -33,6 +33,7 @@ #include "wx/frame.h" #include "wx/listbox.h" #include "wx/button.h" + #include "wx/bmpbuttn.h" #include "wx/msgdlg.h" #include "wx/scrolwin.h" #include "wx/radiobox.h" @@ -509,6 +510,14 @@ bool wxWindowOS2::Enable( if ( hWnd ) ::WinEnableWindow(hWnd, (BOOL)bEnable); + // + // 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; + wxWindowList::Node* pNode = GetChildren().GetFirst(); while (pNode) @@ -2806,6 +2815,11 @@ MRESULT wxWindowOS2::OS2WindowProc( ,&nX ,&nY ); + if (!pWin->IsOfStandardClass()) + { + if (uMsg == WM_BUTTON1DOWN && pWin->AcceptsFocus() ) + pWin->SetFocus(); + } bProcessed = pWin->HandleMouseEvent( uMsg ,nX ,nY