Drag & drop from OS: set to accept any drop operation by default for now
authorDamien Plisson <damien.plisson@yahoo.fr>
Mon, 3 May 2010 17:02:49 +0000 (17:02 +0000)
committerDamien Plisson <damien.plisson@yahoo.fr>
Mon, 3 May 2010 17:02:49 +0000 (17:02 +0000)
intern/ghost/intern/GHOST_DropTargetWin32.cpp
intern/ghost/intern/GHOST_WindowCocoa.mm

index c2185ae9b23b3025a7f32429ef79ed166daa1b38..6470b40649250cbb4c1d5cce7d487d5467105cdb 100644 (file)
@@ -110,8 +110,8 @@ ULONG __stdcall GHOST_DropTargetWin32::Release(void)
  */
 HRESULT __stdcall GHOST_DropTargetWin32::DragEnter(IDataObject * pDataObject, DWORD grfKeyState, POINTL pt, DWORD * pdwEffect)
 {
-       // we don't know yet if we accept the drop.
-       m_window->setAcceptDragOperation(false);
+       // we accept all drop by default
+       m_window->setAcceptDragOperation(true);
        *pdwEffect = DROPEFFECT_NONE;
        
        m_draggedObjectType = getGhostType(pDataObject);
index 7520375c10e1909c1af863b07f635202fbb29be4..6dc2fa5a745948b2dc2f9cc49aa16b727347c142 100644 (file)
@@ -167,7 +167,7 @@ extern "C" {
        else if ([[draggingPBoard types] containsObject:NSStringPboardType]) m_draggedObjectType = GHOST_kDragnDropTypeString;
        else return NSDragOperationNone;
        
-       associatedWindow->setAcceptDragOperation(FALSE); //Drag operation needs to be accepted explicitly by the event manager
+       associatedWindow->setAcceptDragOperation(TRUE); //Drag operation is accepted by default
        systemCocoa->handleDraggingEvent(GHOST_kEventDraggingEntered, m_draggedObjectType, associatedWindow, mouseLocation.x, mouseLocation.y, nil);
        return NSDragOperationCopy;
 }