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

xfce-bugs at xfce.org xfce-bugs at xfce.org
Mon Jan 19 22:13:57 CET 2004


A BUGNOTE has been added to this bug.
=======================================================================
http://bugs.xfce.org/view_bug_page.php?f_id=0000082
=======================================================================
Reporter:                   theferret
Handler:                    
=======================================================================
Project:                    XFCE
Bug ID:                     0000082
Category:                   general
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
=======================================================================
Date Submitted:             2004-01-15 20:29 GMT
Last Modified:              2004-01-19 21:13 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.



More information about the Xfce-bugs mailing list