From 66dfed9b9d00326e79bdd314442288ba30be7cca Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 24 Aug 2001 16:12:40 +0000 Subject: [PATCH] generate wxEVT_ACTIVATE_APP events for wxMSW too git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11456 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/appcmn.cpp | 8 ++++++++ src/gtk/window.cpp | 5 ----- src/gtk1/window.cpp | 5 ----- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/src/common/appcmn.cpp b/src/common/appcmn.cpp index 49dfb98eed..608a40ea4e 100644 --- a/src/common/appcmn.cpp +++ b/src/common/appcmn.cpp @@ -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 diff --git a/src/gtk/window.cpp b/src/gtk/window.cpp index 8f73c4e2db..9b8f1de926 100644 --- a/src/gtk/window.cpp +++ b/src/gtk/window.cpp @@ -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; diff --git a/src/gtk1/window.cpp b/src/gtk1/window.cpp index 8f73c4e2db..9b8f1de926 100644 --- a/src/gtk1/window.cpp +++ b/src/gtk1/window.cpp @@ -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;