handle failure of gtk_drag_begin() (which can happen e.g. because gdk_pointer_grab() failed) in DoDragDrop() (patch 1825237) + minor cleanup in trunk version of the code

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@49608 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2007-11-03 21:46:55 +00:00
parent 33aefff95d
commit 469db76712

View File

@@ -901,6 +901,16 @@ wxDragResult wxDropSource::DoDragDrop(int flags)
g_lastButtonNumber, // number of mouse button which started drag
(GdkEvent*) g_lastMouseEvent );
if ( !context )
{
// this can happen e.g. if gdk_pointer_grab() failed
g_blockEventsOnDrag = false;
UnregisterWindow();
return wxDragError;
}
m_dragContext = context;
PrepareIcon( action, context );