]> git.saurik.com Git - wxWidgets.git/commitdiff
generate wxEVT_ACTIVATE_APP events for wxMSW too
authorVadim Zeitlin <vadim@wxwidgets.org>
Fri, 24 Aug 2001 16:12:40 +0000 (16:12 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Fri, 24 Aug 2001 16:12:40 +0000 (16:12 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11456 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/appcmn.cpp
src/gtk/window.cpp
src/gtk1/window.cpp

index 49dfb98eed528e1194cea145139ed8f1f16d1fbd..608a40ea4e023baa1930d4ba6fd262d222963da2 100644 (file)
@@ -141,7 +141,15 @@ void wxAppBase::ProcessPendingEvents()
 
 void wxAppBase::SetActive(bool active, wxWindow * WXUNUSED(lastFocus))
 {
+    if ( active == m_isActive )
+        return;
+
     m_isActive = active;
+
+    wxActivateEvent event(wxEVT_ACTIVATE_APP, active);
+    event.SetEventObject(this);
+
+    (void)ProcessEvent(event);
 }
 
 #endif // wxUSE_GUI
index 8f73c4e2db7ad7f02f261df34e9a02daa05a5a54..9b8f1de926c3e28897cc3c42709a0505a127bc4e 100644 (file)
@@ -2786,11 +2786,6 @@ void wxWindowGTK::OnInternalIdle()
         g_sendActivateEvent = -1;
 
         wxTheApp->SetActive(activate, (wxWindow *)g_focusWindowLast);
-
-        wxActivateEvent event(wxEVT_ACTIVATE_APP, activate, GetId());
-        event.SetEventObject(this);
-
-        (void)GetEventHandler()->ProcessEvent(event);
     }
 
     wxCursor cursor = m_cursor;
index 8f73c4e2db7ad7f02f261df34e9a02daa05a5a54..9b8f1de926c3e28897cc3c42709a0505a127bc4e 100644 (file)
@@ -2786,11 +2786,6 @@ void wxWindowGTK::OnInternalIdle()
         g_sendActivateEvent = -1;
 
         wxTheApp->SetActive(activate, (wxWindow *)g_focusWindowLast);
-
-        wxActivateEvent event(wxEVT_ACTIVATE_APP, activate, GetId());
-        event.SetEventObject(this);
-
-        (void)GetEventHandler()->ProcessEvent(event);
     }
 
     wxCursor cursor = m_cursor;