Bug 259894 - [SWT_AWT] When IE is embedded in Swing, Alt+F4 notifies twice the window listeners
Summary: [SWT_AWT] When IE is embedded in Swing, Alt+F4 notifies twice the window list...
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: SWT (show other bugs)
Version: 3.5   Edit
Hardware: PC Windows XP
: P3 normal with 1 vote (vote)
Target Milestone: ---   Edit
Assignee: Silenio Quarti CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-03 12:35 EST by Christopher Deckers CLA
Modified: 2019-09-06 15:32 EDT (History)
4 users (show)

See Also:


Attachments
Simple test case that shows the bug. (1.86 KB, text/java)
2009-01-03 12:35 EST, Christopher Deckers CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Christopher Deckers CLA 2009-01-03 12:35:22 EST
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.
Comment 1 Gili Mising name CLA 2009-01-03 16:30:19 EST
I confirmed that windowClosing and windowClosed are fired twice, others are probably affected as well.
Comment 2 Silenio Quarti CLA 2009-01-14 13:51:04 EST
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.
Comment 3 Eclipse Webmaster CLA 2019-09-06 15:32:03 EDT
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.