+// ----------------------------------------------------------------------------
+// window geometry
+// ----------------------------------------------------------------------------
+
+void wxTopLevelWindowGTK::GTKDoSetSize(int width, int height)
+{
+ // avoid recursions
+ if (m_resizing)
+ return;
+ m_resizing = true;
+
+ int old_width = m_width;
+ int old_height = m_height;
+
+ if ( width != -1 )
+ m_width = width;
+ if ( height != -1 )
+ m_height = height;
+
+ // GPE's window manager doesn't like size hints at all, esp. when the user
+ // has to use the virtual keyboard, so don't constrain size there
+#ifndef __WXGPE__
+ int minWidth = GetMinWidth(),
+ minHeight = GetMinHeight(),
+ maxWidth = GetMaxWidth(),
+ maxHeight = GetMaxHeight();
+
+ if ( minWidth != -1 && m_width < minWidth )
+ m_width = minWidth;
+ if ( minHeight != -1 && m_height < minHeight )
+ m_height = minHeight;
+ if ( maxWidth != -1 && m_width > maxWidth )
+ m_width = maxWidth;
+ if ( maxHeight != -1 && m_height > maxHeight )
+ m_height = maxHeight;
+#endif // __WXGPE__
+
+ if ( m_width != old_width || m_height != old_height )
+ {
+ gtk_window_resize( GTK_WINDOW(m_widget), m_width, m_height );
+
+ /* we set the size in GtkOnSize, i.e. mostly the actual resizing is
+ done either directly before the frame is shown or in idle time
+ so that different calls to SetSize() don't lead to flicker. */
+ m_sizeSet = false;
+ }
+
+ m_resizing = false;
+}
+