diff options
author | Damien Plisson <damien.plisson@yahoo.fr> | 2010-05-03 21:02:49 +0400 |
---|---|---|
committer | Damien Plisson <damien.plisson@yahoo.fr> | 2010-05-03 21:02:49 +0400 |
commit | 6cb02a167210a625eecca5d9964addf00e5f542a (patch) | |
tree | c8ebe06683ce60437ef2b46c3da302bfae9bb008 /intern/ghost | |
parent | afa872200c452adaed6d57d6b3c1f79fa86185c0 (diff) |
Drag & drop from OS: set to accept any drop operation by default for now
Diffstat (limited to 'intern/ghost')
-rw-r--r-- | intern/ghost/intern/GHOST_DropTargetWin32.cpp | 4 | ||||
-rw-r--r-- | intern/ghost/intern/GHOST_WindowCocoa.mm | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/intern/ghost/intern/GHOST_DropTargetWin32.cpp b/intern/ghost/intern/GHOST_DropTargetWin32.cpp index c2185ae9b23..6470b406492 100644 --- a/intern/ghost/intern/GHOST_DropTargetWin32.cpp +++ b/intern/ghost/intern/GHOST_DropTargetWin32.cpp @@ -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); diff --git a/intern/ghost/intern/GHOST_WindowCocoa.mm b/intern/ghost/intern/GHOST_WindowCocoa.mm index 7520375c10e..6dc2fa5a745 100644 --- a/intern/ghost/intern/GHOST_WindowCocoa.mm +++ b/intern/ghost/intern/GHOST_WindowCocoa.mm @@ -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; } |