X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/670f9935630beb2123a5ca62894ae92a3f0efa4f..38f833b10c071603eb8d7739ab31b1c07c4576f1:/src/gtk/popupwin.cpp diff --git a/src/gtk/popupwin.cpp b/src/gtk/popupwin.cpp index 47a877cd71..8d1a10b4f9 100644 --- a/src/gtk/popupwin.cpp +++ b/src/gtk/popupwin.cpp @@ -16,11 +16,10 @@ #ifndef WX_PRECOMP #include "wx/app.h" + #include "wx/frame.h" + #include "wx/cursor.h" #endif // WX_PRECOMP -#include "wx/frame.h" -#include "wx/cursor.h" - #include #include #include @@ -77,7 +76,6 @@ static gint gtk_dialog_focus_callback( GtkWidget *widget, GtkDirectionType WXUNU wxapp_install_idle_handler(); /* This disables GTK's tab traversal */ - g_signal_stop_emission_by_name (widget, "focus"); return TRUE; } } @@ -303,18 +301,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 @@ -344,7 +335,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(); } @@ -358,7 +349,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 );