]> git.saurik.com Git - wxWidgets.git/commitdiff
Applied patch [ 642174 ] Stop TOOL_WINDOWS stealing focus
authorJulian Smart <julian@anthemion.co.uk>
Mon, 9 Dec 2002 10:31:17 +0000 (10:31 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Mon, 9 Dec 2002 10:31:17 +0000 (10:31 +0000)
When frames with the wxFRAME_TOOL_WINDOW
style ( i.e. a floating toolbar frame) is shown it is
activated, taking focus from the main application
window. This patch stops frames with the
wxFRAME_TOOL_WINDOW from being activated when
shown.

Scott Pleiter

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18143 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/toplevel.cpp

index bd65405e7fdcf7838bb0aa61a9740a8e41b323e7..9cc4f1d2ffcd008a219ae3e032954386897fefb7 100644 (file)
@@ -517,7 +517,10 @@ bool wxTopLevelWindowMSW::Show(bool show)
         }
         else // just show
         {
-            nShowCmd = SW_SHOW;
+           if ( GetWindowStyle() & wxFRAME_TOOL_WINDOW )
+               nShowCmd = SW_SHOWNA;
+           else
+               nShowCmd = SW_SHOW;
         }
     }
     else // hide