notify all windows in capture stack about capture lost, and empty the stack
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78148 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -187,6 +187,7 @@ public:
|
|||||||
// This is called when capture is taken from the window. It will
|
// This is called when capture is taken from the window. It will
|
||||||
// fire off capture lost events.
|
// fire off capture lost events.
|
||||||
void GTKReleaseMouseAndNotify();
|
void GTKReleaseMouseAndNotify();
|
||||||
|
static void GTKHandleCaptureLost();
|
||||||
|
|
||||||
GdkWindow* GTKGetDrawingWindow() const;
|
GdkWindow* GTKGetDrawingWindow() const;
|
||||||
|
|
||||||
|
@@ -2070,7 +2070,7 @@ size_allocate(GtkWidget*, GtkAllocation* alloc, wxWindow* win)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// "grab_broken"
|
// "grab_broken_event"
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
#if GTK_CHECK_VERSION(2, 8, 0)
|
#if GTK_CHECK_VERSION(2, 8, 0)
|
||||||
@@ -2082,9 +2082,7 @@ gtk_window_grab_broken( GtkWidget*,
|
|||||||
// Mouse capture has been lost involuntarily, notify the application
|
// Mouse capture has been lost involuntarily, notify the application
|
||||||
if(!event->keyboard && wxWindow::GetCapture() == win)
|
if(!event->keyboard && wxWindow::GetCapture() == win)
|
||||||
{
|
{
|
||||||
wxMouseCaptureLostEvent evt( win->GetId() );
|
wxWindowGTK::GTKHandleCaptureLost();
|
||||||
evt.SetEventObject( win );
|
|
||||||
win->HandleWindowEvent( evt );
|
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -4852,6 +4850,12 @@ void wxWindowGTK::GTKReleaseMouseAndNotify()
|
|||||||
NotifyCaptureLost();
|
NotifyCaptureLost();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void wxWindowGTK::GTKHandleCaptureLost()
|
||||||
|
{
|
||||||
|
g_captureWindow = NULL;
|
||||||
|
NotifyCaptureLost();
|
||||||
|
}
|
||||||
|
|
||||||
/* static */
|
/* static */
|
||||||
wxWindow *wxWindowBase::GetCapture()
|
wxWindow *wxWindowBase::GetCapture()
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user