I have fixed the redraw glitches (this was actually partially a problem in Haiku itself; I pushed some patches to Gerrit to resolve it), the hangs on mouse click events (the mouse now mostly works), and crashes on key events (however keyboard input does not work yet.) After a few other compatibility fixes, the “widgets” demo starts and displays largely correctly:
Another update: a number of patches to GTK itself were required in order to avoid having to implement the full XKB structures (which basically nothing else seems to make use of), in addition to a variety of patches to Xlibe, but now keyboard events largely work; only Ctrl/Cmd-based shortcuts do not seem to activate for some reason (however, they also apparently do not work in Tk, so there is likely some common cause.)
Try using DispatchMessage instead of MessageRecieved to handle keyboard messages.
The same way you should handle B_UNMAPPED_KEY_UP/B_UNMAPPED_KEY_DOWN also.
Done. Now Cmd-key shortcuts work in GTK windows. Next I should probably implement some or part of pointer grabs so it stops crash-asserting on menus, and figure out why windows seem to have no title most of the time.
At present it requires a number of hacks and some other patches that I only have locally (for example, fixing the build without XSync, though I probably should just add compatibility stubs for this; and now more importantly, calling Xlib to do key-event translation instead of reading the XKB tables directly.) I will post these somewhere before too long, but not just yet.
Indeed they do.
Unfortunately I don’t think it is, at least that I can see. While there is some Xft code in GTK it appears to just be used to get certain settings (e.g. antialiasing on/off) and not to do any actual font rendering that I can see
As far as I know, starting from GTK 2 all rendering is done offscreen using cairo, including font rendering. The only X11 rendering method GTK uses is XPutImage.
Cairo has several rendering backends. Software rendering is pretty fast, robust and portable (I really love it, tbh). There are pdf, svg, ps, OpenGL, OpenVg backends… more or less maintained. And there is also a Xlib/XRender (where available).
Not sure if there is a way to force Cairo to work with a specific backend. Not sure also if Xlib backend relies on Xlib to render fonts.
GTK font rendering is done exclusively through Cairo, yes, but if someone cared to resurrect the native BeOS backend for Cairo I think it would be possible to write a BFont font driver for Cairo.
Congratulations on everything that you have done so far. (pat on back to you). Anything that makes Haiku more interesting, fun, and where I can actually --work-- in Haiku is VERY much appreciated.
I --used-- to be a programmer (too long of a story) and I can follow most of what you are talking about so it is fun to read your posts. If this helps encourage you on days (and nights) where you don’t feel as much like coding and working on this as others, then this post will be of some value.