diff options
author | Silenio Quarti <silenio> | 2010-08-06 16:02:28 +0000 |
---|---|---|
committer | Silenio Quarti <silenio> | 2010-08-06 16:02:28 +0000 |
commit | 60c04239a6e27037579bb4b1ea556818e12b8cf8 (patch) | |
tree | 8401bf5a24aa710a8d3789e9311d77662a2bfa04 /bundles/org.eclipse.swt/Eclipse SWT Drag and Drop | |
parent | 47f140989d429a69a7d21032266b2d5780c9ed04 (diff) | |
download | eclipse.platform.swt-60c04239a6e27037579bb4b1ea556818e12b8cf8.tar.gz eclipse.platform.swt-60c04239a6e27037579bb4b1ea556818e12b8cf8.tar.xz eclipse.platform.swt-60c04239a6e27037579bb4b1ea556818e12b8cf8.zip |
BugĂ312365 - Carbon: DnD fails when dropping object to a child control
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT Drag and Drop')
-rw-r--r-- | bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/carbon/org/eclipse/swt/dnd/DropTarget.java | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/carbon/org/eclipse/swt/dnd/DropTarget.java b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/carbon/org/eclipse/swt/dnd/DropTarget.java index aee31ffccc..af52555b17 100644 --- a/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/carbon/org/eclipse/swt/dnd/DropTarget.java +++ b/bundles/org.eclipse.swt/Eclipse SWT Drag and Drop/carbon/org/eclipse/swt/dnd/DropTarget.java @@ -279,10 +279,17 @@ static DropTarget FindDropTarget(int theWindow, int theDrag) { OS.SetEventParameter (event[0], OS.kEventParamWindowMouseLocation, OS.typeHIPoint, CGPoint.sizeof, inPoint); OS.HIViewGetViewForMouseEvent (theRoot [0], event [0], theControl); OS.ReleaseEvent(event[0]); - if (!OS.IsControlEnabled(theControl[0])) return null; - Widget widget = display.findWidget(theControl[0]); - if (widget == null) return null; - return (DropTarget)widget.getData(DND.DROP_TARGET_KEY); + if (!OS.IsControlEnabled(theControl[0])) return null; + DropTarget dropTarget = null; + do { + Widget widget = display.findWidget(theControl[0]); + if (widget != null) { + dropTarget = (DropTarget) widget.getData(DND.DROP_TARGET_KEY); + if (dropTarget != null) break; + } + OS.GetSuperControl (theControl [0], theControl); + } while (theControl [0] != 0); + return dropTarget; } /** * Adds the listener to the collection of listeners who will |