vcl/aqua/source/dtrans/DropTarget.cxx | 20 +++++++++++++++----- vcl/aqua/source/dtrans/DropTarget.hxx | 2 +- 2 files changed, 16 insertions(+), 6 deletions(-)
New commits: commit 024b54d68cc4bcd0d4a71be7b686cad98238bfc8 Author: Herbert Dürr <[email protected]> Date: Wed Jun 24 07:08:31 2015 +0000 #i105098# fix drag&drop insertion of files/images on Mac Fixed-by: Manik <[email protected]> Reviewed-by: Herbert Duerr <[email protected]> diff --git a/vcl/aqua/source/dtrans/DropTarget.cxx b/vcl/aqua/source/dtrans/DropTarget.cxx index 46d6780..c02bfdc 100644 --- a/vcl/aqua/source/dtrans/DropTarget.cxx +++ b/vcl/aqua/source/dtrans/DropTarget.cxx @@ -133,7 +133,8 @@ namespace /* private */ -(BOOL)performDragOperation:(id <NSDraggingInfo>)sender { - return mDropTarget->performDragOperation(sender); + (void) sender; + return mDropTarget->performDragOperation(); } @@ -235,7 +236,10 @@ NSDragOperation DropTarget::draggingEntered(id sender) sal_Int8 currentAction = determineDropAction(mDragSourceSupportedActions, sender); NSRect bounds = [mView bounds]; - NSPoint dragLocation = [sender draggedImageLocation]; + NSPoint mouseLoc = [NSEvent mouseLocation]; + + id wnd = [mView window]; + NSPoint dragLocation = [mView convertPoint:[wnd convertScreenToBase:mouseLoc] fromView:nil]; CocoaToVCL(dragLocation, bounds); @@ -274,7 +278,10 @@ NSDragOperation DropTarget::draggingUpdated(id sender) { sal_Int8 currentAction = determineDropAction(currentDragSourceActions, sender); NSRect bounds = [mView bounds]; - NSPoint dragLocation = [sender draggedImageLocation]; + NSPoint mouseLoc = [NSEvent mouseLocation]; + + id wnd = [mView window]; + NSPoint dragLocation = [mView convertPoint:[wnd convertScreenToBase:mouseLoc] fromView:nil]; CocoaToVCL(dragLocation, bounds); @@ -326,7 +333,7 @@ BOOL DropTarget::prepareForDragOperation(id /*sender*/) } -BOOL DropTarget::performDragOperation(id sender) +BOOL DropTarget::performDragOperation() { bool bSuccess = false; @@ -340,7 +347,10 @@ BOOL DropTarget::performDragOperation(id sender) } NSRect bounds = [mView bounds]; - NSPoint dragLocation = [sender draggedImageLocation]; + NSPoint mouseLoc = [NSEvent mouseLocation]; + + id wnd = [mView window]; + NSPoint dragLocation = [mView convertPoint:[wnd convertScreenToBase:mouseLoc] fromView:nil]; CocoaToVCL(dragLocation, bounds); diff --git a/vcl/aqua/source/dtrans/DropTarget.hxx b/vcl/aqua/source/dtrans/DropTarget.hxx index c8532a8..111867c 100644 --- a/vcl/aqua/source/dtrans/DropTarget.hxx +++ b/vcl/aqua/source/dtrans/DropTarget.hxx @@ -133,7 +133,7 @@ public: virtual NSDragOperation draggingUpdated(id sender); virtual void draggingExited(id sender); virtual BOOL prepareForDragOperation(id sender); - virtual BOOL performDragOperation(id sender); + virtual BOOL performDragOperation(); virtual void concludeDragOperation(id sender); /* If multiple actions are supported by the drag source and
_______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
