+ // set size hints
+ gint flag = 0; // GDK_HINT_POS;
+ if ((minWidth != -1) || (minHeight != -1)) flag |= GDK_HINT_MIN_SIZE;
+ if ((maxWidth != -1) || (maxHeight != -1)) flag |= GDK_HINT_MAX_SIZE;
+ GdkGeometry geom;
+ geom.min_width = minWidth;
+ geom.min_height = minHeight;
+ geom.max_width = maxWidth;
+ geom.max_height = maxHeight;
+ gtk_window_set_geometry_hints( GTK_WINDOW(m_widget),
+ (GtkWidget*) NULL,
+ &geom,
+ (GdkWindowHints) flag );
+
+ // I revert back to wxGTK's original behaviour. m_mainWidget holds
+ // the menubar, the toolbar and the client area, which is represented
+ // by m_wxwindow.
+ // This hurts in the eye, but I don't want to call SetSize()
+ // because I don't want to call any non-native functions here.
+
+#if wxUSE_MENUS_NATIVE
+ if (m_frameMenuBar)
+ {
+ int xx = m_miniEdge;
+ int yy = m_miniEdge + m_miniTitle;
+ int ww = m_width - 2*m_miniEdge;
+ int hh = m_menuBarHeight;
+ if (m_menuBarDetached) hh = wxPLACE_HOLDER;
+ m_frameMenuBar->m_x = xx;
+ m_frameMenuBar->m_y = yy;
+ m_frameMenuBar->m_width = ww;
+ m_frameMenuBar->m_height = hh;
+ gtk_pizza_set_size( GTK_PIZZA(m_mainWidget),
+ m_frameMenuBar->m_widget,
+ xx, yy, ww, hh );
+ client_area_y_offset += hh;
+ }
+#endif // wxUSE_MENUS_NATIVE
+
+#if wxUSE_TOOLBAR
+ if ((m_frameToolBar) && m_frameToolBar->IsShown() &&
+ (m_frameToolBar->m_widget->parent == m_mainWidget))
+ {
+ int xx = m_miniEdge;
+ int yy = m_miniEdge + m_miniTitle;
+#if wxUSE_MENUS_NATIVE
+ if (m_frameMenuBar)
+ {
+ if (!m_menuBarDetached)
+ yy += m_menuBarHeight;
+ else
+ yy += wxPLACE_HOLDER;
+ }
+#endif // wxUSE_MENUS_NATIVE