Tuesday, December 04, 2007

argb visuals

x.org can do some pretty cool things these days. everyone knows all about compositing window managers, like kwin 4 and compiz, to name two.

but the fun isn't relegated to the window managers! you can set an argb (alpha, red, green, blue) visual for your application and play with translucency, shaped windows and what not to produce some rather nice visual effects.

plasma has a history of pushing the boundaries of the technologies it uses. this happens because the plasma team looks around, sees what is possible and we imagine what that could be .... and then we write the code to make it happen.

unfortunately in the case of making it happen with argb visuals, it seems that nobody other than window managers are using these things. how do i know? because none of the toolkits actually frigging work properly with them.

Qt has visible painting bugs in scrollable widgets when there is an argb visual.

Gtk+ apps crash when the system tray icon is placed in an app using an argb visual since it apparently can't deal with having the background set with XSetWindowBackgroundPixmap on an XEmbed client window in that particular case. unfortunately, to make the icons work at all properly in an argb window we need to do exactly that.

(i, or someone like me, needs to file a bug against gtk about this. i only tracked this down last night and confirmed the cause, which is why i haven't yet.)

but plasma only really shines with argb visuals: translucent panels, a see-through dashboard, etc.

so now i'm conflicted.

do i release plasma in all its shining glory and show the toolkits to be buggy when it comes to handling argb visuals?

or do i retreat, like probably every other serious app that may have gone before me, and make plasma look less hot (excuse the pun ;) but work properly?

i'm leaning towards "show up the toolkits" for two reasons: a) i really don't like the idea of hobbling our app because of other people's bugs, b) if nobody uses argb visuals, i fear that the toolkit projects will never prioritize the necessary fixes.

it's fun being at the edge of the technology, but they do call it the "bleeding" edge for a reason. well, that's sort of ignoring the fact that we've had argb support in x.org for a while now.