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
This commit is contained in:
@@ -1044,10 +1044,11 @@ bool wxComboCtrlBase::Create(wxWindow *parent,
|
|||||||
m_iFlags |= wxCC_IFLAG_CREATED;
|
m_iFlags |= wxCC_IFLAG_CREATED;
|
||||||
|
|
||||||
// If x and y indicate valid size, wxSizeEvent won't be
|
// 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 )
|
if ( size.x > 0 && size.y > 0 )
|
||||||
{
|
{
|
||||||
wxSizeEvent evt(size,GetId());
|
wxSizeEvent evt(size,GetId());
|
||||||
|
event.SetEventObject(this);
|
||||||
GetEventHandler()->AddPendingEvent(evt);
|
GetEventHandler()->AddPendingEvent(evt);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1751,6 +1752,7 @@ void wxComboCtrlBase::RecalcAndRefresh()
|
|||||||
if ( IsCreated() )
|
if ( IsCreated() )
|
||||||
{
|
{
|
||||||
wxSizeEvent evt(GetSize(),GetId());
|
wxSizeEvent evt(GetSize(),GetId());
|
||||||
|
event.SetEventObject(this);
|
||||||
GetEventHandler()->ProcessEvent(evt);
|
GetEventHandler()->ProcessEvent(evt);
|
||||||
Refresh();
|
Refresh();
|
||||||
}
|
}
|
||||||
|
@@ -1014,6 +1014,7 @@ bool wxTopLevelWindowMSW::ShowFullScreen(bool show, long style)
|
|||||||
|
|
||||||
// finally send an event allowing the window to relayout itself &c
|
// finally send an event allowing the window to relayout itself &c
|
||||||
wxSizeEvent event(rect.GetSize(), GetId());
|
wxSizeEvent event(rect.GetSize(), GetId());
|
||||||
|
event.SetEventObject(this);
|
||||||
HandleWindowEvent(event);
|
HandleWindowEvent(event);
|
||||||
}
|
}
|
||||||
else // stop showing full screen
|
else // stop showing full screen
|
||||||
|
Reference in New Issue
Block a user