Thursday, May 04, 2006
more native xlib awt stuff
Woah! I hacked in kaffe awt up to deep in the night. The rendering of strings inside textfields was broken since a long time! The cursor and the typing was wrong, once enter was hit it worked.
I didn't have big hopes to fix this and I just tried to have a quick look. I discovered that the java part considered the fonts fixed width even if it wasn't and thus returned the wrong charWidth. Without much understanding and even lesser hope I messed inside the native methods!
I was able to understand the faulty logic and implement a new one by accessing the XFontSets and font structures. I queried my first X Atoms!
Although my implementation now is not very robust I think it is definitively correct and now the character width is computed correctly.
The lack of robustness is due that I take the first font struct of a fontset, from a XOC.
in the compulsory screenshot our AWT is running happily on Darwin X11 on MacosX 10.2.8... you may notice how nice the text fields and the file dialogs are!
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment