Add wxActivateEvent::GetActivationReason().

This method is implemented for wxMSW-only currently and allows to check
whether the window is being activated by a mouse click or in some other way
there.

Closes #15516.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74915 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2013-10-02 16:25:04 +00:00
parent 30a7e91fb0
commit 4521f6c88c
4 changed files with 57 additions and 6 deletions

View File

@@ -4049,7 +4049,10 @@ bool wxWindowMSW::HandleActivate(int state,
{
wxActivateEvent event(wxEVT_ACTIVATE,
(state == WA_ACTIVE) || (state == WA_CLICKACTIVE),
m_windowId);
m_windowId,
state == WA_CLICKACTIVE
? wxActivateEvent::Reason_Mouse
: wxActivateEvent::Reason_Unknown);
event.SetEventObject(this);
return HandleWindowEvent(event);