]> git.saurik.com Git - wxWidgets.git/commitdiff
crash in wxAppBase::SetActive fixed
authorVadim Zeitlin <vadim@wxwidgets.org>
Mon, 2 Jul 2001 11:00:01 +0000 (11:00 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Mon, 2 Jul 2001 11:00:01 +0000 (11:00 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10774 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/window.h
src/common/appcmn.cpp

index f6d7b332c2e985c1854731b6b61cbd59d0259b69..bbcd44aa98290827b1a76eeb976d9ef6b932fd79 100644 (file)
@@ -1002,8 +1002,6 @@ inline wxWindow *wxWindowBase::GetGrandParent() const
 // global functions
 // ----------------------------------------------------------------------------
 
-WXDLLEXPORT extern wxWindow* wxGetActiveWindow();
-
 // Find the wxWindow at the current mouse position, also returning the mouse
 // position.
 WXDLLEXPORT extern wxWindow* wxFindWindowAtPointer(wxPoint& pt);
index 761c50b9ff26b68aa01956de8fdb14a4d156dfea..0b7b957dc3378b6a0e91230cbd03ef92db631b75 100644 (file)
@@ -130,25 +130,9 @@ void wxAppBase::ProcessPendingEvents()
 
 #if wxUSE_GUI
 
-void wxAppBase::SetActive(bool active, wxWindow *lastFocus)
+void wxAppBase::SetActive(bool active, wxWindow * WXUNUSED(lastFocus))
 {
-    static wxWindow *s_lastFocus = (wxWindow *)NULL;
-
     m_isActive = active;
-
-    // if we're being deactivated remember the last focused window
-    if ( !active )
-    {
-        s_lastFocus = lastFocus;
-    }
-
-    if ( s_lastFocus )
-    {
-        // give the focused window the chance to refresh itself if its
-        // appearance depends on the app activation state
-        wxActivateEvent event(wxEVT_ACTIVATE, active);
-        s_lastFocus->GetEventHandler()->ProcessEvent(event);
-    }
 }
 
 #endif // wxUSE_GUI