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

Bug 35783

Summary: [DND] Sometimes GTK sends mouse exit during native Drag [portability]
Product: [Eclipse Project] Platform Reporter: Randy Hudson <hudsonr>
Component: SWTAssignee: Platform-SWT-Inbox <platform-swt-inbox>
Status: CLOSED WORKSFORME QA Contact: Kevin Barnes <cocoakevin>
Severity: normal    
Priority: P3 CC: billy.biggs, duongn, ericwill, snorthov, veronika_irvine, xixiyan
Version: 2.1Keywords: helpwanted, triaged
Target Milestone: ---   
Hardware: PC   
OS: Linux-GTK   
Whiteboard:

Description Randy Hudson CLA 2003-03-27 15:39:03 EST
Shell shell = new Shell();
	shell.setLayout(new FillLayout());
	shell.addListener(SWT.MouseExit, new Listener(){
		public void handleEvent(Event event) {
			System.out.println("exit");
		}
	});
	shell.addMouseListener(new MouseAdapter() {
		public void mouseDown(MouseEvent e) {
			System.out.println("down");
		}
		public void mouseUp(MouseEvent e) {
			System.out.println("up");
		}
	});
	DragSource ds = new DragSource(shell, DND.DROP_COPY);
	ds.setTransfer(new Transfer[] {TextTransfer.getInstance()});
	ds.addDragListener(new DragSourceAdapter() {
		public void dragStart(DragSourceEvent event) {
			System.out.println("Drag Start");
		}
	});
	shell.open();
	Display display = Display.getDefault();
	while (!shell.isDisposed())
		if (!display.readAndDispatch())
			display.sleep();

If you press the mouse on the Shell and drag somewhat quickly out of the Shell, 
you will get a MouseExit event.  This never happens on win32, and randomly 
occurs on GTK.  I would guess that Motif has the same problem.
Comment 1 Eric Williams CLA 2017-06-30 12:21:51 EDT
This is still reproducible on 4.7, Fedora 25, with GTK3.22.15.

Bug triaged, visit https://wiki.eclipse.org/SWT/Devel/Triage for more
inforamation.
Comment 2 Xi Yan CLA 2018-12-11 13:25:19 EST
This is not reproducible anymore on Fedora 29, GTK3.24 using SWT master as of today. Closing. Please reopen if the issue reoccurs.