X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/13393ab6233f67b0afe3e02bc6bc3229b8104f43..6a3ab8b15ae649c96727c15e7d091122bddb6b3c:/src/gtk1/frame.cpp diff --git a/src/gtk1/frame.cpp b/src/gtk1/frame.cpp index 961aae908a..38b56e56d9 100644 --- a/src/gtk1/frame.cpp +++ b/src/gtk1/frame.cpp @@ -193,16 +193,6 @@ gtk_frame_realized_callback( GtkWidget *widget, wxFrame *win ) win->SetIcon( icon ); } - if (!win->m_sizeSet) - { - /* by calling GtkOnSize here, we don't have to call - either after showing the frame, which would entail - much ugly flicker or from within the size_allocate - handler, because GTK 1.1.X forbids that. */ - - win->GtkOnSize( win->m_x, win->m_y, win->m_width, win->m_height ); - } - return FALSE; } @@ -391,7 +381,6 @@ bool wxFrame::Show( bool show ) { wxASSERT_MSG( (m_widget != NULL), _T("invalid frame") ); -#if 0 if (show && !m_sizeSet) { /* by calling GtkOnSize here, we don't have to call @@ -401,7 +390,6 @@ bool wxFrame::Show( bool show ) GtkOnSize( m_x, m_y, m_width, m_height ); } -#endif return wxWindow::Show( show ); } @@ -465,8 +453,8 @@ void wxFrame::DoSetSize( int x, int y, int width, int height, int sizeFlags ) { if ((m_x != old_x) || (m_y != old_y)) { - /* m_sizeSet = FALSE; */ - gtk_widget_set_uposition( m_widget, m_x, m_y ); + /* we set the size here and in gtk_frame_map_callback */ + gtk_widget_set_uposition( m_widget, m_x, m_y ); } } @@ -703,7 +691,7 @@ void wxFrame::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y), int width, int height void wxFrame::OnInternalIdle() { - if (!m_sizeSet) + if (!m_sizeSet && GTK_WIDGET_REALIZED(m_wxwindow)) GtkOnSize( m_x, m_y, m_width, m_height ); DoMenuUpdates();