Getting closer: I now have a Pixmap class (to hold and render bitmap data, loading it from #PNG using #libpng), an ImageLabel widget to display a pixmap, and the first working "real" (using #EWMH) dialog window! ๐ฅณ (of course, for testing, an "about box" ๐)
libpng was surprisingly easy. Getting bitmap data with an alpha channel in some #X11 pixmap was surprisingly hard ๐ง. It seems just uploading it with #xcb (xcb_image_put) converts the alpha channel to a single bit, making the corners look super ugly ๐คจ.
So now, I separate out the alpha channel to upload it to a separate pixmap and then combine that with the rgb-pixmap into an argb-pixmap that's finally used for rendering, here's the whole dance:
https://github.com/Zirias/xmoji/blob/b7216b5f134985d9daa3f6b6da8315e9b6739440/src/bin/xmoji/pixmap.c#L68
I *could* save one rendering request by keeping those two pixmaps and render with a mask each time, but didn't because it will consume more server-side memory...
#X11 and #XRender experts: Do I miss anything, is there a saner way? ๐ค
