Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 307441

Summary: [DND] DnD on Linux does not behave as expected with overlapping controls
Product: [Eclipse Project] Platform Reporter: Jamie Liu <liuj1>
Component: SWTAssignee: Platform-SWT-Inbox <platform-swt-inbox>
Status: CLOSED WORKSFORME QA Contact:
Severity: normal    
Priority: P3 CC: ericwill, pinnamur, Silenio_Quarti
Version: 3.5.2Keywords: triaged
Target Milestone: ---   
Hardware: Other   
OS: Linux   
See Also: https://git.eclipse.org/r/102161
https://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/?id=df42da7bdd4b917d662f2f3f7ed4379a3e1e1c0c
Whiteboard:
Attachments:
Description Flags
snippet to demonstrate issue none

Description Jamie Liu CLA 2010-03-29 15:32:19 EDT
Build Identifier: 3.5.2.v3557e

When there are two overlapping child controls of the same composite, the drop handling events are not as expected.  On Linux, the events are not based on which control is visibly "on top", which is the expected behavior (and the behavior on Windows) when a user is dragging something to the drop target.

I am attaching a snippet to better illustrate this issue.

Reproducible: Always

Steps to Reproduce:
1. Launch the attached snippet from the IDE.
2. Drag the control on the left (DragSource) to the controls on the right.  The controls on the right consist of a composite (grey/default background) and the composite's 2 child controls, yellow control "DropLabel1" and red control "DropLabel2".
3. Drag between DropLabel1 and DropLabel2 and observe the console print statements.
4. Notice that the dragEnter event does not occur for DropLabel2 when first entering DropLabel2.  Instead, it occurs when leaving the bounds for DropLabel1.

If DropLabel2's bounds were contained within DropLabel1, DropLabel2 never gets any drop events.
Comment 1 Jamie Liu CLA 2010-03-29 15:37:58 EDT
Created attachment 163323 [details]
snippet to demonstrate issue

Running this on Linux will demonstrate the issue.  Running on Windows will demonstrate the expected behavior.
Comment 2 Eclipse Genie CLA 2017-07-28 09:15:22 EDT
New Gerrit change created: https://git.eclipse.org/r/102161
Comment 4 Eric Williams CLA 2017-07-28 09:38:37 EDT
(In reply to Eclipse Genie from comment #3)
> Gerrit change https://git.eclipse.org/r/102161 was merged to [master].
> Commit:
> http://git.eclipse.org/c/platform/eclipse.platform.swt.git/commit/
> ?id=df42da7bdd4b917d662f2f3f7ed4379a3e1e1c0c

Merged the snippet to reproduce this issue. I cannot reproduce this issue, closing the bug now. If it happens again please re-open with details to reproduce the issue.