projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
unsuccessful attempts to create resizable dir dlg without new folder button; added...
[wxWidgets.git]
/
src
/
gtk
/
popupwin.cpp
diff --git
a/src/gtk/popupwin.cpp
b/src/gtk/popupwin.cpp
index 7f63baa20fff783663d2301ad0785a2d5f2b5945..236a69d036ba98a5372904522f13abfce28f1f9b 100644
(file)
--- a/
src/gtk/popupwin.cpp
+++ b/
src/gtk/popupwin.cpp
@@
-149,12
+149,18
@@
END_EVENT_TABLE()
IMPLEMENT_DYNAMIC_CLASS(wxPopupWindow, wxWindow)
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 )
{
m_needParent = FALSE;
if (!PreCreation( parent, wxDefaultPosition, wxDefaultSize ) ||
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;
{
wxFAIL_MSG( wxT("wxPopupWindow creation failed") );
return FALSE;
@@
-342,9
+348,15
@@
bool wxPopupWindow::Show( bool show )
GtkOnSize( m_x, m_y, m_width, m_height );
}
GtkOnSize( m_x, m_y, m_width, m_height );
}
-
+
+ if (!show)
+ gtk_grab_remove( m_widget );
+
bool ret = wxWindow::Show( show );
bool ret = wxWindow::Show( show );
-
+
+ if (show)
+ gtk_grab_add( m_widget );
+
return ret;
}
return ret;
}