From e16ceb3ca67315531e22417becb2df208529d599 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 4 Nov 2006 13:31:10 +0000 Subject: [PATCH] capture mouse to be notified when it exists the popup rect (bug 1372228) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43033 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/generic/tipwin.cpp | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/src/generic/tipwin.cpp b/src/generic/tipwin.cpp index 12087b7b4b..c64fa5a569 100644 --- a/src/generic/tipwin.cpp +++ b/src/generic/tipwin.cpp @@ -34,10 +34,6 @@ #include "wx/settings.h" #endif // WX_PRECOMP -#ifdef __WXGTK__ - #include -#endif - // ---------------------------------------------------------------------------- // constants // ---------------------------------------------------------------------------- @@ -157,8 +153,7 @@ wxTipWindow::wxTipWindow(wxWindow *parent, Position(wxPoint(x, y), wxSize(0,0)); Popup(m_view); #ifdef __WXGTK__ - if (!GTK_WIDGET_HAS_GRAB(m_widget)) - gtk_grab_add( m_widget ); + m_view->CaptureMouse(); #endif #else Move(x, y); @@ -174,8 +169,8 @@ wxTipWindow::~wxTipWindow() } #ifdef wxUSE_POPUPWIN #ifdef __WXGTK__ - if (GTK_WIDGET_HAS_GRAB(m_widget)) - gtk_grab_remove( m_widget ); + if ( m_view->HasCapture() ) + m_view->ReleaseMouse(); #endif #endif } @@ -228,8 +223,8 @@ void wxTipWindow::Close() #if wxUSE_POPUPWIN Show(false); #ifdef __WXGTK__ - if (GTK_WIDGET_HAS_GRAB(m_widget)) - gtk_grab_remove( m_widget ); + if ( m_view->HasCapture() ) + m_view->ReleaseMouse(); #endif Destroy(); #else -- 2.45.2