|
Quick Lists
|
|
Bug ID:
|
4982522
|
|
Votes
|
1
|
|
Synopsis
|
SWT/AWT embedding Frame does not get Mouse events on Windows.
|
|
Category
|
java:classes_awt
|
|
Reported Against
|
tiger-beta
|
|
Release Fixed
|
|
|
State
|
11-Closed,
Not Reproducible,
bug
|
|
Priority:
|
3-Medium
|
|
Related Bugs
|
|
|
Submit Date
|
23-JAN-2004
|
|
Description
|
Below is the email from Silenio from SWT/Eclipse team.
> Hi Bino,
>
> I have this problem with lightweights on Windows and I was wondering if it
> could
> be fixed in AWT or worked around some other way.
>
> The problem is that Swing components (or any lightweight) will not receive
> mouse events, if they are added directly to the Windows embedded frame
> (WEmbeddedFrame). This problem only happens on Windows, and t is
> possible to work around it by adding a java.awt.Panel between them.
>
> Here is the bug report if you want to take a look:
>
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=50034
>
> Thanks!
> Silenio
I have created a testcase for this problem. Simply unzip the attached testcase
and run in on windows with SWT 3.0 M6 or above. The problem only occurs on windows. The firstr example AWTInSWT_Frame does not work, AWTInSWT_Panel does.
xxxxx@xxxxx 10/6/04 14:46 GMT
|
|
Work Around
|
The workaround is to insert a panel in between the embedding frame and lw cxomponents.
|
|
Evaluation
|
The cause of the problem is that EmbeddedFrame doesn't have
LightweightDispatcher associated with it. This dispatcher should redirect
events to ligthweights inside heavyweight container.
The dispatcher should be created in addNotify(), but we do not call
this method on EmbeddedFrame because we create its peer in its ctor.
I've verified that if user call addNotify() on embedded frame then
the test works correct.
The fact that EmbeddedFrame doesn't have LightweightDispatcher doesn't break
plug-in because it always add heavyweight panel in embedded frame and this panel
has its own dispatcher.
I think it's too late for tiger, but in thext release we should investigate
if calling of addNotify() on EmbeddedFrame won't cause regression.
For now direct call of addNotify() may be used as workaround.
xxxxx@xxxxx Jan 23, 2004
======================================================================
Unfortunately, we have to postpone this issue to dolphin.
xxxxx@xxxxx 2005-06-16 14:05:45 GMT
Posted Date : 2005-06-16 14:05:45.0
Works with JDK 7.
Posted Date : 2009-06-15 15:33:09.0
|
|
Comments
|
PLEASE NOTE: JDK6 is formerly known as Project Mustang
|
|
|
 |