]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/popupwin.cpp
don't build wxscintilla lib if wxSTC is not built
[wxWidgets.git] / src / gtk / popupwin.cpp
index 98bb95953fd2dccc2d12a91fb6602711a75a111f..2de47c76c0d304eab492cb0e81125201bec860d2 100644 (file)
@@ -65,22 +65,6 @@ static gint gtk_popup_button_press (GtkWidget *widget, GdkEvent *gdk_event, wxPo
 }
 }
 
-//-----------------------------------------------------------------------------
-// "focus" from m_window
-//-----------------------------------------------------------------------------
-
-extern "C" {
-static gint gtk_dialog_focus_callback( GtkWidget *widget, GtkDirectionType WXUNUSED(d), wxWindow *WXUNUSED(win) )
-{
-    if (g_isIdle)
-        wxapp_install_idle_handler();
-
-    /* This disables GTK's tab traversal */
-    g_signal_stop_emission_by_name (widget, "focus");
-    return TRUE;
-}
-}
-
 //-----------------------------------------------------------------------------
 // "delete_event"
 //-----------------------------------------------------------------------------
@@ -210,10 +194,6 @@ bool wxPopupWindow::Create( wxWindow *parent, int style )
     g_signal_connect (m_widget, "realize",
                       G_CALLBACK (gtk_dialog_realized_callback), this);
 
-    // disable native tab traversal
-    g_signal_connect (m_widget, "focus",
-                      G_CALLBACK (gtk_dialog_focus_callback), this);
-
     m_time = gtk_get_current_event_time();
 
     g_signal_connect (m_widget, "button_press_event",
@@ -302,18 +282,11 @@ void wxPopupWindow::DoSetSize( int x, int y, int width, int height, int sizeFlag
     m_resizing = false;
 }
 
-void wxPopupWindow::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y), int width, int height )
+void wxPopupWindow::GtkOnSize()
 {
-    // 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_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
@@ -343,7 +316,7 @@ void wxPopupWindow::GtkOnSize( int WXUNUSED(x), int WXUNUSED(y), int width, int
 void wxPopupWindow::OnInternalIdle()
 {
     if (!m_sizeSet && GTK_WIDGET_REALIZED(m_wxwindow))
-        GtkOnSize( m_x, m_y, m_width, m_height );
+        GtkOnSize();
 
     wxWindow::OnInternalIdle();
 }
@@ -357,7 +330,7 @@ bool wxPopupWindow::Show( bool show )
            much ugly flicker nor from within the size_allocate
            handler, because GTK 1.1.X forbids that. */
 
-        GtkOnSize( m_x, m_y, m_width, m_height );
+        GtkOnSize();
     }
 
     bool ret = wxWindow::Show( show );