// Author: Robert Roebling
// Id: $Id$
// Copyright: (c) 1998 Robert Roebling
-// Licence: wxWindows licence
+// Licence: wxWidgets 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
/* Callback for wxFrame. This very strange beast has to be used because
* C++ has no virtual methods in a constructor. We have to emulate a
- * virtual function here as wxWindows requires different ways to insert
+ * virtual function here as wxWidgets requires different ways to insert
* a child in container classes. */
static void wxInsertChildInDialog( wxPopupWindow* parent, wxWindow* child )
wxPopupWindow::~wxPopupWindow()
{
- if (GTK_WIDGET_HAS_GRAB(m_widget))
- gtk_grab_remove( m_widget );
}
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;
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;
}