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

Bug 424275

Summary: Mouse click event in a control of shellX is also fired in a widget in shellY which is below shellX
Product: [Eclipse Project] Platform Reporter: andreas <au>
Component: SWTAssignee: Platform-SWT-Inbox <platform-swt-inbox>
Status: CLOSED WORKSFORME QA Contact:
Severity: normal    
Priority: P3 CC: ericwill
Version: 4.2.1Keywords: triaged
Target Milestone: ---   
Hardware: PC   
OS: Linux-GTK   
Whiteboard:
Attachments:
Description Flags
Code to show the triggering of an MouseUp event in the shell below, after closeing the shell above none

Description andreas CLA 2013-12-17 16:48:29 EST
Created attachment 238416 [details]
Code to show the triggering of an MouseUp event in the shell below, after closeing the shell above

This behaviour occured for me in a ContentHelper popup which was layed over an other Text Widget. The DoubleClick mouse event leads to a selection in the Popup and the PopupDialog is closed. Then the other Text Widget (not the one for which the ContentHelper exists) gets an MouseUp event (with count=2).

I have then tried to find an example with only swt widgets (without the jface stuff). In the attachment you will find a Shell with a Button and Text Widget. A click on the Button opens a second Shell which is laid above the Text Widget. A click in the second Shell (the click must be in the area of the Text Widget), leads to an MouseUp event in the Text Widget below. 

This behaviour is the same on Linux and Windows. On MacOSX the MouseUp event is not triggered. 

Maybe the event is triggered by the OS and outside of SWT. A workaround is to close shells only in MouseUp Events, but this is error-prone, because a mouse-event which leads to a closing of the shell (or popup like in the ContentHelper) has an effect in a shell below, which is not expected.
Comment 1 Eric Williams CLA 2018-11-30 11:14:44 EST
I cannot reproduce the issue on 4.10 RC1, GTK3.24, and Fedora 29.