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
9 changes: 8 additions & 1 deletion java/awt/dnd/DropTargetContext.java
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,18 @@ public void removeNotify()
protected void setTargetActions(int actions)
{
targetActions = actions;
if (dtcp != null)
dtcp.setTargetActions(actions);
}

protected int getTargetActions()
{
return targetActions;
// As in the JDK, the peer knows the actions; without one, use the
// drop target's default actions.
if (dtcp != null)
return dtcp.getTargetActions();
return targetActions != 0 ? targetActions
: dropTarget.getDefaultActions();
}

/**
Expand Down
Loading