[kaffe] Re-used event objects (again)

Benja Fallenstein b.fallenstein at gmx.de
Thu Jan 9 15:01:02 PST 2003


Dalibor,

Dalibor Topic wrote:
> In the case above, I think patching kaffe would be
> better than working around bugs.

Thanks for your answer. It took me some time to figure out, but in the 
end the patch was really trivial (attached). The reason was that 
KeyEvt.dispatch() reused the current KeyEvt object for KEY_TYPED events 
right after issuing KEY_PRESSED.

I've changed it so that it will create a new KeyEvt object. It will even 
re-use a cached object if caching is activated (it's off by default, see 
java.awt.Defaults.RecycleEvents).

Gzz (compiled against IBM's JDK so far) runs for me under Kaffe, now. 
Success! :-)

Thank you,
- Benja
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: keyevent.patch
Url: http://kaffe.org/pipermail/kaffe/attachments/20030109/b6b5d653/attachment-0003.txt 


More information about the kaffe mailing list