Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 5 additions & 9 deletions java/awt/dnd/DragSource.java
Original file line number Diff line number Diff line change
Expand Up @@ -144,15 +144,11 @@ public void startDrag(DragGestureEvent trigger, Cursor dragCursor,
{
flavorMap = map;

if (peer == null)
peer = Toolkit.getDefaultToolkit().createDragSourceContextPeer(trigger);

if (context == null)
context = createDragSourceContext(peer, trigger,
dragCursor,
dragImage,
imageOffset, trans,
dsl);
// Each drag gets its own peer and context; reusing the first ones
// would drag the first Transferable again.
peer = Toolkit.getDefaultToolkit().createDragSourceContextPeer(trigger);
context = createDragSourceContext(peer, trigger, dragCursor,
dragImage, imageOffset, trans, dsl);

if (peer == null)
throw new InvalidDnDOperationException();
Expand Down
Loading