]> git.saurik.com Git - wxWidgets.git/commitdiff
active next window in Z-order when a frame is deleted
authorVáclav Slavík <vslavik@fastmail.fm>
Sun, 7 Oct 2001 09:46:26 +0000 (09:46 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Sun, 7 Oct 2001 09:46:26 +0000 (09:46 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11868 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mgl/window.cpp

index 51610f63915d11a71090a32acb9d3d0357e9e07e..00bc22aae5a88ebd208f742f368d7c2000c395b5 100644 (file)
@@ -532,10 +532,21 @@ wxWindowMGL::~wxWindowMGL()
 
     if ( gs_mouseCapture == this )
         ReleaseMouse();
+
     if (gs_activeFrame == this)
+    {
+       // activate next frame in Z-order:
+       if ( m_wnd->prev )
+       {
+           wxWindowMGL *win = (wxWindowMGL*)m_wnd->prev->userData;
+           win->SetFocus();
+        }
         gs_activeFrame = NULL;
+    }
+    
     if ( gs_focusedWindow == this )
         KillFocus();
+
     if ( gs_windowUnderMouse == this )
         gs_windowUnderMouse = NULL;