RGBA Colormap by default in GTK+: Call for a Coder 17 February, 2008
Hi Gtk+ hackers
I’m writing this post to see if someone is interested in writing a small patch to make all apps use the RGBA colormap, when available.

The Approach
I’ve discussed few days about *which could be the saner approach* in IRC with thos, ebassi, benzea etc etc.
Of course, same discussion could follow in mailing lists, if you don’t agree with that.
The approach we have in mind can be explained in that way (fell free to correct me if could be better):
- Adding a GtkSetting, something like a boolean rgba-colormap = TRUE | FALSE.
- Mapping that GtkSetting to an Xsetting.
- Reading this GtkSetting before initializing a Window, and here set a RGBA colormap if available.
Using RGBA colormaps will give the Window an alpha value, useful to draw fancy things, from transparent widgets till rounded menus/tooltips.
Patches are Welcome
Unfortunately I’m not the right man, now, to write that patch. First of all I’m really busy with exams, then I lack of basic GTK knowledge, and this could cost me days/weeks instead an hour of coding ![]()
I’ve shown you this feature request, here there’s a bugzilla bug too.
If you’re interested in a fancy eye-candy evolution for the gnome world (optional eheheh, clearlooks *is* and *will be* our rockin’ default theme), this patch is essential, since my Murrine (RGBA capable) engine is absolutely stable and ready for the masses ![]()
A Murrine’s release could follow the Gtk+ release that will have this patch in.
Comments are Welcome
If you have to contribute in a constructive way to the discussion please follow the bugzilla, otherwise feel free to comment here on my blog.
Posted in English, GNOME, GTK, Murrine |
17 February, 2008 alle 20:37
It would be a great compliment to show off our new Metacity with compositing support.
17 February, 2008 alle 20:41
With the actual metacity implementation RGBA could be useful to have rounded menus and thing like this.
It will surely work with an engine like Murrine, but I personally recommend a WM with blur support for transparency (which depends on OpenGL and not Xrender like metacity…)
17 February, 2008 alle 20:47
Is it possible not to have the “main” window transparent and just the window-decoration?
17 February, 2008 alle 21:12
May I be so self-centeredly offtopic as to ask what actual Metacity and Murrine theme you’re using in that screenshot? I think I already did, so.. thanks.
17 February, 2008 alle 21:17
@3:
Sure
@4:
It’s Emerald, not metacity.
Murrine theme is not available for the current Murrine stable release
17 February, 2008 alle 21:30
I really liked to write a patch but i don’t neither C nor GTK+
@Cimi Is there some other way to contribute? (that has nothing to do with coding)
PS: Mike Oldfield! Yeah! ^^
17 February, 2008 alle 21:42
Ah! I forgot a word! I don’t know neither C nor GTK+.
Also I just read the bugzilla. If I understood it right, the GTK+ Patch is not needed to have RGBA support for some apps.
But you wrote:
“this patch is essential, since my Murrine (RGBA capable) engine is absolutely stable and ready for the masses
A Murrine’s release could follow the Gtk+ release that will have this patch in.”
Does this mean, we won’t get (officialy) the new murrine befor GTK+ is not patched? O.O
and as you said: (bugzilla)
“But this needs work and a long discussion. I’m not sure it will be added in the
next months…”
17 February, 2008 alle 21:43
@6:
you can autojoin #murrine in freenode, and follow the development and requests.
On the other hands, adding rgba on few applications it is very easy, just take a look at murrine website
17 February, 2008 alle 21:45
Just out of curiosity: is blurring (as in, gasp, Vista) doable with this as well? Because that’s a lot more usable and nice looking than plain transparency, imo.
17 February, 2008 alle 21:47
@Mårten:
RTFM, or play wih emerald settings. Its possible from old beryl times
And it doesnt need any GTK patch because window-decorator is not related to gtk.
17 February, 2008 alle 21:48
Hi,
Congrats for your work.
Note that i’m unable to determine which windows is focused on the screenshot unless watching the task bar :/
I’m not used with XSetting API, but i should take an eye on the work needed. I may be able to write this.
Regards,
Étienne.
17 February, 2008 alle 21:49
@max:
Wherent you never interested what was “blur” plugin in beryl/compiz for ?
RTFM too
17 February, 2008 alle 21:50
@9:
Blur requires OpenGL’s Pixel Shaders… so it depends on an OpenGL window manager like Compiz.
@11:
This is because my Window Manager theme sucks
17 February, 2008 alle 22:20
cimi sorry but i think i misunderstood
you have always told that the gtk are argb compliant since a long time ago and you have demostrated too
but now you say your murrine needs a patch to the gimp toolkit to work and you will release the new murrine only when the gtk patch will be approved
am i right in every part or have i misunderstood something?
17 February, 2008 alle 22:46
@14:
Murrine works even without a patch into Gtk+, using current Gtk code. Some apps works with this.
A patch could make things simpler…
17 February, 2008 alle 23:07
Hello, just want to say that I’ve just test your new engine (for the moment just the gedit plugin). And it look realy great. Hope we can have this patch soon… and the configurator too. Did someone help you with this since the last post ?
Apparence is not a useless thing. Niether art. We need beautyfull, clean and pleasant workspace for our everyday — long — time in front of a computer.
Thank’s a lot.
17 February, 2008 alle 23:44
very good, you cleared my doubt
but now i’ve a question:
do you think the patch will be applied to 2.22 or only in september with the new gnome 2.24?
18 February, 2008 alle 0:49
@17:
it depends if coders will come
18 February, 2008 alle 3:49
Hi Cimi. It certainly looks like much progress has been made. I was just wondering:
Where did the git trunk go?
(Perhaps I’m a bit greedy and wish to jump the gun a bit, but I would love the eyecandy.)
20 February, 2008 alle 22:16
I think it went to the gnome SVN server..
Cimi, can you release the theme for the people using the SVN version, or will you wait until the final release?
21 February, 2008 alle 2:46
@20:
theme does not affect transparency
21 February, 2008 alle 8:42
I know, I just like it.
22 February, 2008 alle 19:17
ti prego cimi, non voglio spammare, ma amo veramente il bordo delle finestre che stai usando!
dove lo posso trovare?
Grazie
22 February, 2008 alle 19:18
scusami…in realtà mi rendo conto solo ora che amot tutto quello che hai usato nello screenshot :sbav:
23 February, 2008 alle 2:04
English please or I won’t reply
23 February, 2008 alle 18:04
@23 it seems to be an emerald theme.
if I’m wong please correct me.
Just have a look to italian ubuntu forum to know how to install it, because I think here it’s off topic.
bye
27 February, 2008 alle 23:52
Does anyone know how to fix the following error when trying to add transparency to a pygtk application:
The error was ‘BadMatch (invalid parameter attributes)’.
(Details: serial 359 error_code 8 request_code 2 minor_code 0)
(Note to programmers: normally, X errors are reported asynchronously;
that is, you will receive the error a while after causing it.
To debug your program, run it with the –sync command line
option to change this behavior. You can then get a meaningful
backtrace from your debugger if you break on the gdk_x_error() function.)
28 February, 2008 alle 0:27
I’m sure your application has a trayicon, so you just need to push a rgb colormap before drawing the tray, then pop again.
2 March, 2008 alle 16:34
Can you translate in italian this post please !?
5 March, 2008 alle 11:38
it’s better to switching to rgba colormap in module
module source:
–cut rgba.c–
#include
#include
static GdkColormap *colormap;
G_MODULE_EXPORT void
gtk_module_init (gint * argc, gchar *** argv)
{
colormap = gdk_screen_get_rgba_colormap(gdk_screen_get_default());
gtk_widget_push_colormap(colormap);
gtk_widget_set_default_colormap(colormap);
}
–end cut–
compile into librgba.so, copy it to modules directory and set environment variable GTK_MODULES=”rgba”
firefox crashes, metacity with compositor crashes, pidgin crashes and pygtk-apps has hardcoded usage rgb colormap default. Some problems with notify-area applet
(all about murrine-svn)
so, module need some improvement, like reading env RGBA_BLACKLIST and verify which of applications starting.
5 March, 2008 alle 11:58
@geek:
There’s already a firefox bug opened about their bug.
All your applications that crash (except firefox and OO) are crashing because of the tray icons, which get Xorg badmatches.
Tray icons MUST have an RGB colormap.
Murrine is 100% stable, the problem is in Gtk+, Xorg and fake widgets (firefox)
5 March, 2008 alle 12:12
>Tray icons MUST have an RGB colormap.
ok,
>Murrine is 100% stable
i just mean that testing with murrine-svn
>the problem is in Gtk+, Xorg and fake widgets (firefox)
i’ll look in gnome bugzilla
7 March, 2008 alle 15:12
cimi, where I can find that theme? It’s fantastic!
gtk theme and metacity theme…
thanks…
12 March, 2008 alle 1:22
how you getting a blur windows?
(”blur” compiz plugin work only for window decorations for me)
30 March, 2008 alle 23:56
This is really nice, you rock bro. I’m writing a tiny hangman game in python and I successfully added the rgba colormap feature but… In your screenshot I see that the transparency gets blurred how did you do that?
31 March, 2008 alle 4:22
great stuff. can’t help you tough.
blur: if you use ccsm, go to the blur settings and set it so that ‘any’ window is blured…
1 April, 2008 alle 1:38
@matyy: ccsm? I guess you mean the compiz fusion settings manager and if you do I already tried that but then it blurs all the windows that are not focused, if you take a closer look at the screenshots of cimi’s desktop have blur only on the transparency of the windows making the transparency look less clear…
1 April, 2008 alle 1:49
@matyy: I now know that you meant the compizconfig but still I can’t find a way to get the same effect I’m using the ccsm on ubuntu 8.04…
1 April, 2008 alle 1:50
You have to uncheck the « Focus Blur » box, and just keep the « Alpha Blur one ».
1 April, 2008 alle 3:31
Thanks oliver but I can’t get that same effect, I will try it on another pc maybe alpha blur is not working on ubuntu 8.04
1 April, 2008 alle 3:35
I’m under Hardy Heron and have this effet.
Maybee it’s your graphic card ?
Did you get the last svn murrine engine and the themes ?
Sorry, no other idear.
1 April, 2008 alle 3:46
Well, I’m using Gutsy Gibbon, my graphic card is a Nvidia FX 5200, svn murrine and the themes are the new human-murrine and a murrine theme I made myself…
1 April, 2008 alle 4:01
my bad it is hardy heron
16 April, 2008 alle 16:28
I just want a transparency for toolbar and scrollbars background is it possible?