-
- m_resizing = FALSE;
-}
-
-void wxPopupWindow::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y), int width, int height )
-{
- // due to a bug in gtk, x,y are always 0
- // m_x = x;
- // m_y = y;
-
- if ((m_height == height) && (m_width == width) && (m_sizeSet)) return;
- if (!m_wxwindow) return;
-
- m_width = width;
- m_height = height;
-
- /* FIXME: is this a hack? */
- /* Since for some reason GTK will revert to using maximum size ever set
- for this window, we have to set geometry hints maxsize to match size
- given. Also set the to that minsize since resizing isn't possible
- anyway. */
-
- /* set size hints */
- gint flag = GDK_HINT_MAX_SIZE | GDK_HINT_MIN_SIZE; // GDK_HINT_POS;
- GdkGeometry geom;
- geom.min_width = m_width;
- geom.min_height = m_height;
- geom.max_width = m_width;
- geom.max_height = m_height;
- gtk_window_set_geometry_hints( GTK_WINDOW(m_widget),
- (GtkWidget*) NULL,
- &geom,
- (GdkWindowHints) flag );
-
-
- m_sizeSet = TRUE;
-
- wxSizeEvent event( wxSize(m_width,m_height), GetId() );
- event.SetEventObject( this );
- GetEventHandler()->ProcessEvent( event );
-}
-
-void wxPopupWindow::OnInternalIdle()
-{
- if (!m_sizeSet && GTK_WIDGET_REALIZED(m_wxwindow))
- GtkOnSize( m_x, m_y, m_width, m_height );
-
- wxWindow::OnInternalIdle();