From: Julian Smart Date: Mon, 9 Dec 2002 10:31:17 +0000 (+0000) Subject: Applied patch [ 642174 ] Stop TOOL_WINDOWS stealing focus X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/84cff9658571992925bfb02b916fb17285ba257f Applied patch [ 642174 ] Stop TOOL_WINDOWS stealing focus 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 --- diff --git a/src/msw/toplevel.cpp b/src/msw/toplevel.cpp index bd65405e7f..9cc4f1d2ff 100644 --- a/src/msw/toplevel.cpp +++ b/src/msw/toplevel.cpp @@ -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