From 36e2955a64a41e743fbd151c2466450ef99b323b Mon Sep 17 00:00:00 2001 From: "Unknown (MT)" Date: Thu, 30 Sep 1999 08:01:13 +0000 Subject: [PATCH] only set parent frame ontop when the current frame being destructed is active git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3760 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/msw/frame.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/msw/frame.cpp b/src/msw/frame.cpp index 252fc36d9a..54215fde43 100644 --- a/src/msw/frame.cpp +++ b/src/msw/frame.cpp @@ -154,6 +154,9 @@ wxFrame::~wxFrame() // For some reason, wxWindows can activate another task altogether // when a frame is destroyed after a modal dialog has been invoked. // Try to bring the parent to the top. + // MT:Only do this if this frame is currently the active window, else weird + // things start to happen + if ( wxGetActiveWindow() == this ) if (GetParent() && GetParent()->GetHWND()) ::BringWindowToTop((HWND) GetParent()->GetHWND()); } @@ -668,10 +671,8 @@ bool wxFrame::ProcessCommand(int id) return FALSE; wxMenuItem *item = bar->FindItemForId(id); - if ( !item ) - return FALSE; - if ( item->IsCheckable() ) + if ( item && item->IsCheckable() ) { bar->Check(id, !bar->IsChecked(id)) ; } -- 2.50.0