modified fix for empty client area, first one broke sizing of some children

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49731 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Paul Cornett
2007-11-09 05:10:41 +00:00
parent 4264606eed
commit 2a74bd2763

View File

@@ -369,16 +369,21 @@ gtk_frame_map_callback( GtkWidget* widget,
} }
} }
const bool wasIconized = win->IsIconized();
win->SetIconizeState(false); win->SetIconizeState(false);
// Because GetClientSize() returns (0,0) when IsIconized() is true, if (wasIconized)
// a size event must be sent here, just in case GetClientSize() was {
// called while iconized. // Because GetClientSize() returns (0,0) when IsIconized() is true,
// This specifically happens when restoring a tlw that was "rolled up" // a size event must be generated, just in case GetClientSize() was
// with some WMs. // called while iconized. This specifically happens when restoring a
wxSizeEvent event(win->GetSize(), win->GetId()); // tlw that was "rolled up" with some WMs.
event.SetEventObject(win); // Queue a resize rather than sending size event directly to allow
win->GetEventHandler()->ProcessEvent(event); // children to be made visible first.
win->m_oldClientWidth = 0;
gtk_widget_queue_resize(win->m_wxwindow);
}
return false; return false;
} }
@@ -437,9 +442,8 @@ static gboolean property_notify_event(
if (win->m_width < 0) win->m_width = 0; if (win->m_width < 0) win->m_width = 0;
if (win->m_height < 0) win->m_height = 0; if (win->m_height < 0) win->m_height = 0;
decorSize = size; decorSize = size;
wxSizeEvent event(win->GetSize(), win->GetId()); win->m_oldClientWidth = 0;
event.SetEventObject(win); gtk_widget_queue_resize(win->m_wxwindow);
win->GetEventHandler()->ProcessEvent(event);
} }
} }
if (data) if (data)