Re: [gtk-list] Why is system visual == DefaultVisual?



>  The problem is that gdk_visual_get_system returns the result of the
>  DefaultVisual Xlib call, which on my system at least just returns the
>  visual of the root window. This means all gtk applications get an 8-bit
>  visual, which is bad because there are not that many of them, and why
>  use 8 bits, when there are better visuals?
>  
>  Does anyone know if there is a reason not to use a TrueColor or
>  DirectColor 24-bit visual if there is one available as the default
>  visual in gtk?=20

Because the fat visuals consume a lot more resources than 8-bit
pseudocolor, and they are slower.

The idea of having multiple visuals is that most of your application's
UI can run in a small and lean visual, like 8-bit pseudocolor, while
areas that need high quality images can use fatter visuals.  And some
hardware lets you pop up an 8-bit pseudocolor window over a 24-bit
truecolor one, and when it goes away, no exposures will be sent to the
24-bit window, thus increasing performance.

>  As things are now, there are a lot of program crashes due to "Bad Match"
>  in the X-server, which I guess is related to this.

This means the program is buggy.  It should be fixed.  Can you tell us
which programs are having such problems?

  Federico



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]