Community
Participate
Working Groups
Created attachment 121467 [details] Simple test case that shows the bug. Build ID: 3.5 Steps To Reproduce: 1. Create an embedded Shell using the SWT_AWT bridge, and add a Browser that uses IE. 2. Add the Shell to a Swing application. 3. Add a Window listener to the AWT window. 4. Give the focus to the Browser and press Alt+F4. -> The AWT window closing listener is notified twice. More information: This is a pitfall that can have nasty side effects, because adding a window closing listener is a common way of performing application cleanup and it is not generally coded to be called twice in a row. I tried on Linux as well as with SWT.MOZILLA on Windows and this bug does not occur. I also tried with a Button and it does not occur either, so this seems to be an IE only issue. Unfortunately, the Browser (using IE) is probably the most used component when embedding SWT in Swing.
I confirmed that windowClosing and windowClosed are fired twice, others are probably affected as well.
The problem happens because the WM_SYSKEYDOWN for Alt+F4 is dispatched twice: once in OleFrame.getMsgProc() and another in Display.readAndDispatch(). This code is quite complicated. Steve and I to investigate it when he is back.
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet. If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.