]> git.saurik.com Git - wxWidgets.git/commitdiff
Set event object correctly for the generated wxSizeEvents.
authorVadim Zeitlin <vadim@wxwidgets.org>
Sat, 23 Apr 2011 11:17:40 +0000 (11:17 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Sat, 23 Apr 2011 11:17:40 +0000 (11:17 +0000)
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
src/msw/toplevel.cpp

index abb162921e85c79aa1fcb9cbaadbe75a2edb6f01..59297fe943154c39ad5f75a0d5be9a97c2041d6b 100644 (file)
@@ -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();
     }
index 07496bff06cbb59a7b643d608d41dace6811276c..7ece1c72c971b5a76ed4cc3d696e17bee6b7f02a 100644 (file)
@@ -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