+#else
+ // GTK+ catches the activate events from the popup
+ // window, not the focus events from the child window
+ delete m_handlerFocus;
+ m_handlerFocus = new wxPopupFocusHandler(this);
+ PushEventHandler(m_handlerFocus);
+#endif // __WXMSW__
+
+}
+
+bool wxPopupTransientWindow::Show( bool show )
+{
+#ifdef __WXGTK__
+ if (!show)
+ {
+ gdk_pointer_ungrab( (guint32)GDK_CURRENT_TIME );
+
+ gtk_grab_remove( m_widget );
+ }
+#endif
+
+#ifdef __WXX11__
+ if (!show)
+ {
+ XUngrabPointer( wxGlobalDisplay(), CurrentTime );
+ }
+#endif
+
+ bool ret = wxPopupWindow::Show( show );
+
+#ifdef __WXGTK__
+ if (show)
+ {
+ gtk_grab_add( m_widget );
+
+ gdk_pointer_grab( m_widget->window, TRUE,
+ (GdkEventMask)
+ (GDK_BUTTON_PRESS_MASK |
+ GDK_BUTTON_RELEASE_MASK |
+ GDK_POINTER_MOTION_HINT_MASK |
+ GDK_POINTER_MOTION_MASK),
+ (GdkWindow *) NULL,
+ (GdkCursor *) NULL,
+ (guint32)GDK_CURRENT_TIME );
+ }
+#endif