X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ad9fb0334fbfe5747b67c09ba714c1f00bd40ff8..c66b63e565d340f3a73441a4f780ab57842c7851:/src/gtk/popupwin.cpp?ds=sidebyside diff --git a/src/gtk/popupwin.cpp b/src/gtk/popupwin.cpp index 923a68bbd1..4c6a9f8cbc 100644 --- a/src/gtk/popupwin.cpp +++ b/src/gtk/popupwin.cpp @@ -7,11 +7,12 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma implementation "popupwin.h" #endif -#include "wx/defs.h" +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" #if wxUSE_POPUPWIN @@ -151,8 +152,6 @@ IMPLEMENT_DYNAMIC_CLASS(wxPopupWindow, wxWindow) wxPopupWindow::~wxPopupWindow() { - if (GTK_WIDGET_HAS_GRAB(m_widget)) - gtk_grab_remove( m_widget ); } bool wxPopupWindow::Create( wxWindow *parent, int style ) @@ -160,7 +159,7 @@ bool wxPopupWindow::Create( wxWindow *parent, int style ) m_needParent = FALSE; if (!PreCreation( parent, wxDefaultPosition, wxDefaultSize ) || - !CreateBase( parent, -1, wxDefaultPosition, wxDefaultSize, style, wxDefaultValidator, "popup" )) + !CreateBase( parent, -1, wxDefaultPosition, wxDefaultSize, style, wxDefaultValidator, wxT("popup") )) { wxFAIL_MSG( wxT("wxPopupWindow creation failed") ); return FALSE; @@ -349,14 +348,8 @@ bool wxPopupWindow::Show( bool show ) GtkOnSize( m_x, m_y, m_width, m_height ); } - if (!show) - gtk_grab_remove( m_widget ); - bool ret = wxWindow::Show( show ); - if (show) - gtk_grab_add( m_widget ); - return ret; }