Module: wine Branch: master Commit: 300b231107388c38c89fdfe74415706486394fb1 URL: http://source.winehq.org/git/wine.git/?a=commit;h=300b231107388c38c89fdfe744...
Author: Ken Thomases ken@codeweavers.com Date: Tue Jun 18 05:42:42 2013 -0500
winemac: Cope with apps which return multiple DROPEFFECTs from IDropTarget::DragEnter() and DragOver().
---
dlls/winemac.drv/dragdrop.c | 11 +++++------ 1 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/dlls/winemac.drv/dragdrop.c b/dlls/winemac.drv/dragdrop.c index f7e797b..612a868 100644 --- a/dlls/winemac.drv/dragdrop.c +++ b/dlls/winemac.drv/dragdrop.c @@ -307,12 +307,11 @@ static DWORD drag_operations_to_dropeffects(uint32_t ops) */ static uint32_t dropeffect_to_drag_operation(DWORD effect, uint32_t ops) { - switch (effect) - { - case DROPEFFECT_COPY: return (ops & DRAG_OP_COPY) ? DRAG_OP_COPY : DRAG_OP_GENERIC; - case DROPEFFECT_MOVE: return DRAG_OP_MOVE; - case DROPEFFECT_LINK: return (ops & DRAG_OP_LINK) ? DRAG_OP_LINK : DRAG_OP_GENERIC; - } + if (effect & DROPEFFECT_LINK && ops & DRAG_OP_LINK) return DRAG_OP_LINK; + if (effect & DROPEFFECT_COPY && ops & DRAG_OP_COPY) return DRAG_OP_COPY; + if (effect & DROPEFFECT_MOVE && ops & DRAG_OP_MOVE) return DRAG_OP_MOVE; + if (effect & DROPEFFECT_LINK && ops & DRAG_OP_GENERIC) return DRAG_OP_GENERIC; + if (effect & DROPEFFECT_COPY && ops & DRAG_OP_GENERIC) return DRAG_OP_GENERIC;
return DRAG_OP_NONE; }