[kaffe] Bug report: MouseListeners, getComponentAt
Dalibor Topic
robilad@yahoo.com
Wed Feb 19 07:39:01 2003
--0-504524369-1045669190=:68034
Content-Type: text/plain; charset=us-ascii
Content-Id:
Content-Disposition: inline
hi David,
--- novalis@newbabe.mengwong.com wrote:
>
> http://novalis.org/src/DemoPanelBug.java
> demonstrates a major inconsistency
> between Sun's JRE and Kaffe in the handling of
> MouseEvents. A workaround
> is to give each component of the container a
> MouseListener and siimply
> check e.getSource ().
... and fixed. I've attached an updated test case to
verify the fix works. It would be nice if you could
check if the CVS version exhibits the same bug with
other types of events.
cheers,
dalibor topic
__________________________________________________
Do you Yahoo!?
Yahoo! Shopping - Send Flowers for Valentine's Day
http://shopping.yahoo.com
--0-504524369-1045669190=:68034
Content-Type: application/octet-stream; name="DemoPanelBug.java"
Content-Transfer-Encoding: base64
Content-Description: DemoPanelBug.java
Content-Disposition: attachment; filename="DemoPanelBug.java"
LyoKVG8gdHJpZ2dlciB0aGUgYnVnOiBDbGljayBvbiBlYWNoIG9mIHRoZSBm
b3VyIHF1YXJ0ZXJzIG9mIHRoZSBncmlkLCBpbgpjbG9ja3dpc2Ugb3JkZXIu
CgpLYWZmZSBmcm9tIERlYmlhbi4gLXZlcnNpb24gZ2l2ZXMgCidFbmdpbmU6
IEp1c3QtaW4tdGltZSAgIFZlcnNpb246IDEuMC43ICAgSmF2YSBWZXJzaW9u
OiAxLjEnCgpPdXRwdXQgaXM6CkNsaWNrZWQgamF2YS5hd3QuQ2FudmFzW2Nh
bnZhczAsMCwwLDQ4eDYyXSBhdCBqYXZhLmF3dC5Qb2ludFt4PTMzLHk9NDBd
CkNsaWNrZWQgamF2YS5hd3QuTGFiZWxbbnVsbCw0OCwwLDQ4eDYyLExhYmVs
OiBhXSBhdCBqYXZhLmF3dC5Qb2ludFt4PTY0LHk9MzZdCkNsaWNrZWQgamF2
YS5hd3QuUGFuZWxbbnVsbCw0OCw2Miw0OHg2MixsYXlvdXQ9amF2YS5hd3Qu
Rmx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