[Xfce-bugs] [XFCE 0000082]: xfwm4 does not handle visual selection properly

xfce-bugs at xfce.org xfce-bugs at xfce.org
Thu Jul 15 19:41:07 CEST 2004


A BUGNOTE has been added to this bug.
=======================================================================
http://bugs.xfce.org/view_bug_page.php?f_id=0000082
=======================================================================
Reporter:                   theferret
Handler:                    olivier
=======================================================================
Project:                    XFCE
Bug ID:                     0000082
Category:                   general
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     assigned
=======================================================================
Date Submitted:             2004-01-15 20:29 GMT
Last Modified:              2004-07-15 17:41 GMT
=======================================================================
Summary:                    xfwm4 does not handle visual selection properly
Description: 
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

=======================================================================

-----------------------------------------------------------------------
 olivier - 2004-01-15 20:37 GMT 
-----------------------------------------------------------------------
xfce relies on gtk for that. 

Olivier.

-----------------------------------------------------------------------
 theferret - 2004-01-15 22:05 GMT 
-----------------------------------------------------------------------
sylpheed uses gtk as well. But it somehow does it right, whereas xfwm does
not.
Please take a look at the sylpheed code.

-----------------------------------------------------------------------
 olivier - 2004-01-18 22:25 GMT 
-----------------------------------------------------------------------
FYI, sylpheed use gtk1 and we use gtk2. The visual selection code has been
deprecated in gtk2.

-----------------------------------------------------------------------
 olivier - 2004-01-18 22:27 GMT 
-----------------------------------------------------------------------
Change to minor, as it impacts a very few users.

-----------------------------------------------------------------------
 theferret - 2004-01-18 23:15 GMT 
-----------------------------------------------------------------------
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.

-----------------------------------------------------------------------
 theferret - 2004-01-18 23:55 GMT 
-----------------------------------------------------------------------
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()

-----------------------------------------------------------------------
 olivier - 2004-01-19 21:13 GMT 
-----------------------------------------------------------------------
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.

-----------------------------------------------------------------------
 olivier - 2004-01-19 21:17 GMT 
-----------------------------------------------------------------------
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!

-----------------------------------------------------------------------
 olivier - 2004-01-24 15:34 GMT 
-----------------------------------------------------------------------
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.

-----------------------------------------------------------------------
 theferret - 2004-01-26 23:13 GMT 
-----------------------------------------------------------------------
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?

-----------------------------------------------------------------------
 theferret - 2004-02-24 07:48 GMT 
-----------------------------------------------------------------------
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.

-----------------------------------------------------------------------
 huysmans - 2004-07-15 17:41 GMT 
-----------------------------------------------------------------------
I guess this can be closed?



More information about the Xfce-bugs mailing list