]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/popupwin.cpp
* When hiding a wxWindow make sure that none of its subviews are the first
[wxWidgets.git] / src / gtk / popupwin.cpp
index 2dafe977bb6b44dc31b8b2dfce309095f01bfe5d..a16315563ba736ce45c364fb4f077a213a0f583d 100644 (file)
@@ -19,7 +19,7 @@
 
 #include <gtk/gtk.h>
 
 
 #include <gtk/gtk.h>
 
-#include "wx/gtk/win_gtk.h"
+#include "wx/gtk/private/win_gtk.h"
 
 //-----------------------------------------------------------------------------
 // "button_press"
 
 //-----------------------------------------------------------------------------
 // "button_press"
@@ -53,7 +53,7 @@ static gint gtk_popup_button_press (GtkWidget *widget, GdkEvent *gdk_event, wxPo
     wxFocusEvent event( wxEVT_KILL_FOCUS, win->GetId() );
     event.SetEventObject( win );
 
     wxFocusEvent event( wxEVT_KILL_FOCUS, win->GetId() );
     event.SetEventObject( win );
 
-    (void)win->GetEventHandler()->ProcessEvent( event );
+    (void)win->HandleWindowEvent( event );
 
     return TRUE;
 }
 
     return TRUE;
 }
@@ -109,12 +109,10 @@ gtk_dialog_realized_callback( GtkWidget * WXUNUSED(widget), wxPopupWindow *win )
 
 static void wxInsertChildInPopupWin(wxWindowGTK* parent, wxWindowGTK* child)
 {
 
 static void wxInsertChildInPopupWin(wxWindowGTK* parent, wxWindowGTK* child)
 {
-    gtk_pizza_put( GTK_PIZZA(parent->m_wxwindow),
-                   child->m_widget,
-                   child->m_x,
-                   child->m_y,
-                   child->m_width,
-                   child->m_height );
+    gtk_widget_set_size_request(
+        child->m_widget, child->m_width, child->m_height);
+    gtk_fixed_put(
+        GTK_FIXED(parent->m_wxwindow), child->m_widget, child->m_x, child->m_y);
 
     if (parent->HasFlag(wxTAB_TRAVERSAL))
     {
 
     if (parent->HasFlag(wxTAB_TRAVERSAL))
     {
@@ -165,7 +163,7 @@ bool wxPopupWindow::Create( wxWindow *parent, int style )
     g_signal_connect (m_widget, "delete_event",
                       G_CALLBACK (gtk_dialog_delete_callback), this);
 
     g_signal_connect (m_widget, "delete_event",
                       G_CALLBACK (gtk_dialog_delete_callback), this);
 
-    m_wxwindow = gtk_pizza_new();
+    m_wxwindow = wxPizza::New(m_windowStyle);
     gtk_widget_show( m_wxwindow );
     GTK_WIDGET_UNSET_FLAGS( m_wxwindow, GTK_CAN_FOCUS );
 
     gtk_widget_show( m_wxwindow );
     GTK_WIDGET_UNSET_FLAGS( m_wxwindow, GTK_CAN_FOCUS );
 
@@ -229,7 +227,7 @@ void wxPopupWindow::DoSetSize( int x, int y, int width, int height, int sizeFlag
         gtk_widget_set_size_request( m_widget, m_width, m_height );
         wxSizeEvent event(GetSize(), GetId());
         event.SetEventObject(this);
         gtk_widget_set_size_request( m_widget, m_width, m_height );
         wxSizeEvent event(GetSize(), GetId());
         event.SetEventObject(this);
-        GetEventHandler()->ProcessEvent(event);
+        HandleWindowEvent(event);
     }
 }
 
     }
 }
 
@@ -239,7 +237,7 @@ bool wxPopupWindow::Show( bool show )
     {
         wxSizeEvent event(GetSize(), GetId());
         event.SetEventObject(this);
     {
         wxSizeEvent event(GetSize(), GetId());
         event.SetEventObject(this);
-        GetEventHandler()->ProcessEvent(event);
+        HandleWindowEvent(event);
     }
 
     bool ret = wxWindow::Show( show );
     }
 
     bool ret = wxWindow::Show( show );