! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
xfwm4 does not handle visual selection properly
Status:
CLOSED: FIXED

Comments

Description phil 2004-01-15 20:29:55 CET
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
do that.

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:

sylpheed
Comment 1 Olivier Fourdan editbugs 2004-01-15 20:37:20 CET
xfce relies on gtk for that.

Olivier.
Comment 2 phil 2004-01-15 22:05:54 CET
sylpheed uses gtk as well. But it somehow does it right, whereas xfwm does not.
Please take a look at the sylpheed code.
Comment 3 Olivier Fourdan editbugs 2004-01-18 22:25:51 CET
FYI, sylpheed use gtk1 and we use gtk2. The visual selection code has been
deprecated in gtk2.
Comment 4 Olivier Fourdan editbugs 2004-01-18 22:27:41 CET
Change to minor, as it impacts a very few users.
Comment 5 phil 2004-01-18 23:15:05 CET
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
supposed to.
Comment 6 phil 2004-01-18 23:55:02 CET
gdk_visual_get_best_with_depth(24) seems to be a non-deprecated function you
can use.

or even more generally, gdk_visual_get_best()
Comment 7 Olivier Fourdan editbugs 2004-01-19 21:13:57 CET
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.
Comment 8 Olivier Fourdan editbugs 2004-01-19 21:17:12 CET
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!
Comment 9 Olivier Fourdan editbugs 2004-01-24 15:34:08 CET
Hi,

I have no hw that supports more than one visual, so I need your help to try out
this version:

http://xfce.org/archive/test/xfwm4-4.0.4-cvs.tar.gz

and see if that works.

Waiting, for your inputs,
TIA
Olivier.
Comment 10 phil 2004-01-26 23:13:11 CET
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
environment?
Comment 11 phil 2004-02-24 07:48:47 CET
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
next release.
Comment 12 Jasper Huijsmans editbugs 2004-07-15 17:41:07 CEST
I guess this can be closed?
Comment 13 phil 2004-07-15 18:43:11 CEST
if the new colormap code is in there, then sure, close it.
Comment 14 Olivier Fourdan editbugs 2004-07-16 20:30:48 CEST
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.

Bug #82

Reported by:
phil
Reported on: 2004-01-15
Last modified on: 2009-07-15

People

Assignee:
Olivier Fourdan
CC List:
0 users

Version

Attachments

Additional information