From 00e8e44cf43f423a61c0712499b313e8a2bb1556 Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Fri, 30 Sep 2011 09:38:35 +0000 Subject: OSX: Fixed screen updates durin DND operations git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@9090 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_cocoa.mm | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm index 67cae882c..876426b43 100644 --- a/src/Fl_cocoa.mm +++ b/src/Fl_cocoa.mm @@ -1738,6 +1738,7 @@ static void q_set_window_title(NSWindow *nsw, const char * name, const char *mi int ret = Fl::handle( FL_DND_ENTER, target ); breakMacEventLoop(); fl_unlock_function(); + Fl::flush(); return ret ? NSDragOperationCopy : NSDragOperationNone; } - (NSDragOperation)draggingUpdated:(id < NSDraggingInfo >)sender @@ -1749,6 +1750,10 @@ static void q_set_window_title(NSWindow *nsw, const char * name, const char *mi int ret = Fl::handle( FL_DND_DRAG, target ); breakMacEventLoop(); fl_unlock_function(); + // if the DND started in the same application, Fl::dnd() will not return until + // the the DND operation is finished. The call below causes the drop indicator + // to be draw correctly (a full event handling would be better...) + Fl::flush(); return ret ? NSDragOperationCopy : NSDragOperationNone; } - (BOOL)performDragOperation:(id )sender -- cgit v1.2.3