X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9dcd75f8daf6cb7240b834da9354cc3a785659fd..eed9e4791274d68ea1fb0c556bf3199ecf88a7d9:/src/generic/tipwin.cpp?ds=sidebyside diff --git a/src/generic/tipwin.cpp b/src/generic/tipwin.cpp index 84d8d86f62..17093b2d9e 100644 --- a/src/generic/tipwin.cpp +++ b/src/generic/tipwin.cpp @@ -6,7 +6,7 @@ // Created: 10.09.00 // RCS-ID: $Id$ // Copyright: (c) 2000 Vadim Zeitlin -// Licence: wxWindows license +// Licence: wxWindows licence /////////////////////////////////////////////////////////////////////////////// // ============================================================================ @@ -17,7 +17,7 @@ // headers // ---------------------------------------------------------------------------- -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma implementation "tipwin.h" #endif @@ -31,7 +31,9 @@ #ifndef WX_PRECOMP #include "wx/dcclient.h" #endif // WX_PRECOMP - +#ifdef __WXGTK__ + #include +#endif #include "wx/tipwin.h" #if wxUSE_TIPWINDOW @@ -76,6 +78,7 @@ private: #endif // !wxUSE_POPUPWIN DECLARE_EVENT_TABLE() + DECLARE_NO_COPY_CLASS(wxTipWindowView) }; // ============================================================================ @@ -156,6 +159,10 @@ wxTipWindow::wxTipWindow(wxWindow *parent, #if wxUSE_POPUPWIN Position(wxPoint(x, y), wxSize(0, 0)); Popup(m_view); + #ifdef __WXGTK__ + if (!GTK_WIDGET_HAS_GRAB(m_widget)) + gtk_grab_add( m_widget ); + #endif #else Move(x, y); Show(TRUE); @@ -168,6 +175,12 @@ wxTipWindow::~wxTipWindow() { *m_windowPtr = NULL; } + #ifdef wxUSE_POPUPWIN + #ifdef __WXGTK__ + if (GTK_WIDGET_HAS_GRAB(m_widget)) + gtk_grab_remove( m_widget ); + #endif + #endif } void wxTipWindow::OnMouseClick(wxMouseEvent& WXUNUSED(event)) @@ -217,6 +230,10 @@ void wxTipWindow::Close() #if wxUSE_POPUPWIN Show(FALSE); + #ifdef __WXGTK__ + if (GTK_WIDGET_HAS_GRAB(m_widget)) + gtk_grab_remove( m_widget ); + #endif Destroy(); #else wxFrame::Close();