On a display that has 8bit and 24bit visuals available, and
the 8bit is the "default" visual.. xfwm does not look for the best visual
available. It just uses the default, which is the 8bit visual, which makes
colors very messy.
This is a bug. The X programming guide says that you should look for the best
visual to use, not just use the default visual. But it does not appear that you
Please note that while the most noticable component for this is "xfwm", I
believe all xfce components share this problem.
Sample free software program that autoselects best visual to use appropriately:
xfce relies on gtk for that.
sylpheed uses gtk as well. But it somehow does it right, whereas xfwm does not.
Please take a look at the sylpheed code.
FYI, sylpheed use gtk1 and we use gtk2. The visual selection code has been
deprecated in gtk2.
Change to minor, as it impacts a very few users.
huh. okay, so sylpheed isnt the perfect example any more. But that doesnt
change that you're not doing visual selection properly.
If "the visual selection code has been deprecated in gtk2", ("deprecated"
as opposed to "removed") but there isnt a replacement API that actually works
properly, then please use the deprecated API, so that color works as it is
gdk_visual_get_best_with_depth(24) seems to be a non-deprecated function you
or even more generally, gdk_visual_get_best()
Yeah, I know about these, but if you look at the API you'll see that these
return a GdkVisual*, but they won't set the Visual, so it's helpless.
gtk_widget_set_default_visual() *is* deprecated and defines as (void) in gtk2.
Oh, and to reply to your previous post gtk_widget_set_default_visual() does
absolutely nothing in gtk2, as documented.
#define gtk_widget_set_default_visual(visual) ((void) 0)
You may cun'tn paste this in a program, that will do nothing!
I have no hw that supports more than one visual, so I need your help to try out
and see if that works.
Waiting, for your inputs,
I have previously nuked my build tree.
Is there any way to compile JUST the tarfile you gave me, with just
the xfce standard binaries installed?
rather than trying to reconstruct the very large chained xfce build
I apologize that I have not followed up on this. I will probably not get time
to do so soon.
if your code uses the gtk_widget_push_colormap(gdk_rgb_get_colormap()); type
trick, and it works on your regular visual stuff, please just put it in the
I guess this can be closed?
if the new colormap code is in there, then sure, close it.
It's in 4.0 for sure, as for 4.2, I think there is a big issue with that gtk
code and gtk multihead. I can't guarantee that will stay, but for now, it's
safe to close that bug.