]> git.saurik.com Git - wxWidgets.git/commitdiff
fixing coordinates for dnd, see #10876
authorStefan Csomor <csomor@advancedconcepts.ch>
Wed, 10 Jun 2009 06:37:48 +0000 (06:37 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Wed, 10 Jun 2009 06:37:48 +0000 (06:37 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@60970 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/osx/cocoa/window.mm

index 9a10b8874352f5d695f992aa415c9bfc75bc8968..8052d8b314a71bd46c9f71cae5036ca554d146fa 100644 (file)
@@ -706,7 +706,8 @@ unsigned int wxWidgetCocoaImpl::draggingEntered(void* s, WXWidget WXUNUSED(slf),
         return NSDragOperationNone;
 
     wxDragResult result = wxDragNone;
-    wxPoint pt = wxFromNSPoint( m_osxView, [sender draggingLocation] );
+    NSPoint nspoint = [m_osxView convertPoint:[sender draggingLocation] fromView:nil];
+    wxPoint pt = wxFromNSPoint( m_osxView, nspoint );
 
     if ( sourceDragMask & NSDragOperationLink )
         result = wxDragLink;
@@ -771,7 +772,8 @@ unsigned int wxWidgetCocoaImpl::draggingUpdated(void* s, WXWidget WXUNUSED(slf),
         return NSDragOperationNone;
 
     wxDragResult result = wxDragNone;
-    wxPoint pt = wxFromNSPoint( m_osxView, [sender draggingLocation] );
+    NSPoint nspoint = [m_osxView convertPoint:[sender draggingLocation] fromView:nil];
+    wxPoint pt = wxFromNSPoint( m_osxView, nspoint );
 
     if ( sourceDragMask & NSDragOperationLink )
         result = wxDragLink;
@@ -811,7 +813,8 @@ bool wxWidgetCocoaImpl::performDragOperation(void* s, WXWidget WXUNUSED(slf), vo
     wxWindow* wxpeer = GetWXPeer();
     wxDropTarget* target = wxpeer->GetDropTarget();
     wxDragResult result = wxDragNone;
-    wxPoint pt = wxFromNSPoint( m_osxView, [sender draggingLocation] );
+    NSPoint nspoint = [m_osxView convertPoint:[sender draggingLocation] fromView:nil];
+    wxPoint pt = wxFromNSPoint( m_osxView, nspoint );
 
     if ( sourceDragMask & NSDragOperationLink )
         result = wxDragLink;