m_gdkFunc = 0;
m_grabbed = false;
m_deferShow = true;
+ m_deferShowAllowed = true;
m_updateDecorSize = true;
m_urgency_hint = -2;
gtk_container_add( GTK_CONTAINER(m_widget), m_mainWidget );
// m_wxwindow is the client area
- m_wxwindow = wxPizza::New();
+ m_wxwindow = wxPizza::New(0,this);
gtk_widget_show( m_wxwindow );
gtk_container_add( GTK_CONTAINER(m_mainWidget), m_wxwindow );
{
wxASSERT_MSG( (m_widget != NULL), wxT("invalid frame") );
- bool deferShow = show && !m_isShown && m_deferShow;
+ bool deferShow = show && !m_isShown && m_deferShow && m_deferShowAllowed;
if (deferShow)
{
deferShow = false;
{
wxCHECK_RET( m_widget, wxT("invalid frame") );
+ m_deferShowAllowed = true;
+
// deal with the position first
int old_x = m_x;
int old_y = m_y;
void wxTopLevelWindowGTK::DoSetClientSize(int width, int height)
{
- if (m_deferShow && !m_isShown)
- // Since client size is being explicitly set, don't change it later
- m_deferShow = false;
+ // Since client size is being explicitly set, don't change it later
+ m_deferShowAllowed = false;
+
wxTopLevelWindowBase::DoSetClientSize(width, height);
}
bool new_hint_value = false;
// FIXME: This is a workaround to focus handling problem
- // If RequestUserAttention is called for example right after a wxSleep, OnInternalIdle hasn't
- // yet been processed, and the internal focus system is not up to date yet.
- // wxYieldIfNeeded ensures the processing of it, but can have unwanted side effects - MR
- ::wxYieldIfNeeded();
+ // If RequestUserAttention is called for example right after a wxSleep, OnInternalIdle
+ // hasn't yet been processed, and the internal focus system is not up to date yet.
+ // YieldFor(wxEVT_CATEGORY_UI) ensures the processing of it (hopefully it
+ // won't have side effects) - MR
+ wxEventLoopBase::GetActive()->YieldFor(wxEVT_CATEGORY_UI);
if(m_urgency_hint >= 0)
g_source_remove(m_urgency_hint);