- const short dragRegionOuterBoundary = 10 ;
- const short dragRegionInnerBoundary = 9 ;
-
- SetRectRgn( dragRegion , ev->where.h - dragRegionOuterBoundary ,
- ev->where.v - dragRegionOuterBoundary ,
- ev->where.h + dragRegionOuterBoundary ,
- ev->where.v + dragRegionOuterBoundary ) ;
-
- SetRectRgn( tempRgn , ev->where.h - dragRegionInnerBoundary ,
- ev->where.v - dragRegionInnerBoundary ,
- ev->where.h + dragRegionInnerBoundary ,
- ev->where.v + dragRegionInnerBoundary ) ;
-
- DiffRgn( dragRegion , tempRgn , dragRegion ) ;
- DisposeRgn( tempRgn ) ;
-
- // TODO:work with promises in order to return data only when drag
- // was successfully completed
-
- gTrackingGlobals.m_currentSource = this ;
- result = TrackDrag(theDrag, ev , dragRegion);
- DisposeRgn(dragRegion);
- DisposeDrag(theDrag);
- gTrackingGlobals.m_currentSource = NULL ;
-
- KeyMap keymap;
- GetKeys(keymap);
- bool optionDown = keymap[1] & 4;
- wxDragResult dndresult = optionDown ? wxDragCopy : wxDragMove;
+
+ const short dragRegionOuterBoundary = 10;
+ const short dragRegionInnerBoundary = 9;
+
+ SetRectRgn(
+ dragRegion,
+ ev->where.h - dragRegionOuterBoundary,
+ ev->where.v - dragRegionOuterBoundary,
+ ev->where.h + dragRegionOuterBoundary,
+ ev->where.v + dragRegionOuterBoundary );
+
+ SetRectRgn(
+ tempRgn,
+ ev->where.h - dragRegionInnerBoundary,
+ ev->where.v - dragRegionInnerBoundary,
+ ev->where.h + dragRegionInnerBoundary,
+ ev->where.v + dragRegionInnerBoundary );
+
+ DiffRgn( dragRegion, tempRgn, dragRegion );
+ DisposeRgn( tempRgn );
+
+ // TODO: work with promises in order to return data
+ // only when drag was successfully completed
+
+ gTrackingGlobals.m_currentSource = this;
+ TrackDrag( theDrag, ev, dragRegion );
+ DisposeRgn( dragRegion );
+ DisposeDrag( theDrag );
+ gTrackingGlobals.m_currentSource = NULL;
+
+ bool optionDown = GetCurrentKeyModifiers() & optionKey;
+ wxDragResult dndresult = wxDragCopy;
+ if ( flags != wxDrag_CopyOnly )
+ // on mac the option key is always the indication for copy
+ dndresult = optionDown ? wxDragCopy : wxDragMove;
+