From df97a4ef79613ac2f73a62601a9fa738d79c77a4 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 23 Apr 2011 11:17:40 +0000 Subject: [PATCH] Set event object correctly for the generated wxSizeEvents. wxSizeEvent event object was not set correctly in at least a couple of places. Do set it now. Closes #13156. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67583 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/combocmn.cpp | 4 +++- src/msw/toplevel.cpp | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/common/combocmn.cpp b/src/common/combocmn.cpp index abb162921e..59297fe943 100644 --- a/src/common/combocmn.cpp +++ b/src/common/combocmn.cpp @@ -1044,10 +1044,11 @@ bool wxComboCtrlBase::Create(wxWindow *parent, m_iFlags |= wxCC_IFLAG_CREATED; // If x and y indicate valid size, wxSizeEvent won't be - // emitted automatically, so we need to add artifical one. + // emitted automatically, so we need to add artificial one. if ( size.x > 0 && size.y > 0 ) { wxSizeEvent evt(size,GetId()); + event.SetEventObject(this); GetEventHandler()->AddPendingEvent(evt); } @@ -1751,6 +1752,7 @@ void wxComboCtrlBase::RecalcAndRefresh() if ( IsCreated() ) { wxSizeEvent evt(GetSize(),GetId()); + event.SetEventObject(this); GetEventHandler()->ProcessEvent(evt); Refresh(); } diff --git a/src/msw/toplevel.cpp b/src/msw/toplevel.cpp index 07496bff06..7ece1c72c9 100644 --- a/src/msw/toplevel.cpp +++ b/src/msw/toplevel.cpp @@ -1014,6 +1014,7 @@ bool wxTopLevelWindowMSW::ShowFullScreen(bool show, long style) // finally send an event allowing the window to relayout itself &c wxSizeEvent event(rect.GetSize(), GetId()); + event.SetEventObject(this); HandleWindowEvent(event); } else // stop showing full screen -- 2.45.2