From: Stefan Csomor Date: Wed, 10 Jun 2009 06:46:05 +0000 (+0000) Subject: allow vetoing on drop, see #10876 X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/5646fba6b09d067405c514a5bfac6ccbd98357ce allow vetoing on drop, see #10876 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60971 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/osx/cocoa/window.mm b/src/osx/cocoa/window.mm index 8052d8b314..713fce435b 100644 --- a/src/osx/cocoa/window.mm +++ b/src/osx/cocoa/window.mm @@ -826,7 +826,10 @@ bool wxWidgetCocoaImpl::performDragOperation(void* s, WXWidget WXUNUSED(slf), vo PasteboardRef pboardRef; PasteboardCreate((CFStringRef)[pboard name], &pboardRef); target->SetCurrentDragPasteboard(pboardRef); - result = target->OnData(pt.x, pt.y, result); + + if (target->OnDrop(pt.x, pt.y)) + result = target->OnData(pt.x, pt.y, result); + CFRelease(pboardRef); return result != wxDragNone;