summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
Diffstat (limited to 'vcl')
-rw-r--r--vcl/osx/DropTarget.cxx20
-rw-r--r--vcl/osx/DropTarget.hxx2
2 files changed, 16 insertions, 6 deletions
diff --git a/vcl/osx/DropTarget.cxx b/vcl/osx/DropTarget.cxx
index b52e433f6db1..13190ff1ed86 100644
--- a/vcl/osx/DropTarget.cxx
+++ b/vcl/osx/DropTarget.cxx
@@ -105,7 +105,8 @@ namespace /* private */
-(BOOL)performDragOperation:(id <NSDraggingInfo>)sender
{
- return mDropTarget->performDragOperation(sender);
+ (void) sender;
+ return mDropTarget->performDragOperation();
}
-(void)concludeDragOperation:(id <NSDraggingInfo>)sender
@@ -201,7 +202,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);
@@ -239,7 +243,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);
@@ -288,7 +295,7 @@ BOOL DropTarget::prepareForDragOperation()
return 1;
}
-BOOL DropTarget::performDragOperation(id sender)
+BOOL DropTarget::performDragOperation()
{
bool bSuccess = false;
@@ -302,7 +309,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/osx/DropTarget.hxx b/vcl/osx/DropTarget.hxx
index 09f4ee898218..d31f5069b30a 100644
--- a/vcl/osx/DropTarget.hxx
+++ b/vcl/osx/DropTarget.hxx
@@ -125,7 +125,7 @@ public:
NSDragOperation draggingUpdated(id sender);
void draggingExited(id sender);
static BOOL prepareForDragOperation();
- BOOL performDragOperation(id sender);
+ BOOL performDragOperation();
void concludeDragOperation(id sender);
/* If multiple actions are supported by the drag source and