Postpone size event from wxTLW resizing to idle
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58332 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -148,6 +148,9 @@ private:
|
|||||||
bool m_grabbed;
|
bool m_grabbed;
|
||||||
|
|
||||||
bool m_updateDecorSize;
|
bool m_updateDecorSize;
|
||||||
|
|
||||||
|
public:
|
||||||
|
bool m_resizeQueued;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // _WX_GTK_TOPLEVEL_H_
|
#endif // _WX_GTK_TOPLEVEL_H_
|
||||||
|
@@ -222,9 +222,13 @@ size_allocate(GtkWidget*, GtkAllocation* alloc, wxTopLevelWindowGTK* win)
|
|||||||
|
|
||||||
if (!win->IsIconized())
|
if (!win->IsIconized())
|
||||||
{
|
{
|
||||||
|
#if 1
|
||||||
|
win->m_resizeQueued = true;
|
||||||
|
#else
|
||||||
wxSizeEvent event(size, win->GetId());
|
wxSizeEvent event(size, win->GetId());
|
||||||
event.SetEventObject(win);
|
event.SetEventObject(win);
|
||||||
win->HandleWindowEvent(event);
|
win->HandleWindowEvent(event);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
// else the window is currently unmapped, don't generate size events
|
// else the window is currently unmapped, don't generate size events
|
||||||
}
|
}
|
||||||
@@ -445,6 +449,8 @@ void wxTopLevelWindowGTK::Init()
|
|||||||
m_updateDecorSize = true;
|
m_updateDecorSize = true;
|
||||||
|
|
||||||
m_urgency_hint = -2;
|
m_urgency_hint = -2;
|
||||||
|
|
||||||
|
m_resizeQueued = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxTopLevelWindowGTK::Create( wxWindow *parent,
|
bool wxTopLevelWindowGTK::Create( wxWindow *parent,
|
||||||
@@ -1089,6 +1095,15 @@ void wxTopLevelWindowGTK::OnInternalIdle()
|
|||||||
|
|
||||||
wxTheApp->SetActive(activate, (wxWindow *)g_lastActiveFrame);
|
wxTheApp->SetActive(activate, (wxWindow *)g_lastActiveFrame);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (m_resizeQueued)
|
||||||
|
{
|
||||||
|
wxSize size( m_width, m_height );
|
||||||
|
wxSizeEvent event(size, GetId());
|
||||||
|
event.SetEventObject(this);
|
||||||
|
HandleWindowEvent(event);
|
||||||
|
m_resizeQueued = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
Reference in New Issue
Block a user