comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: LINUX Device Question
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: LINUX Device Question [message #43221 is a reply to message #43220] Thu, 24 March 2005 11:51 Go to previous messageGo to previous message
Karl Schultz is currently offline  Karl Schultz
Messages: 341
Registered: October 1999
Senior Member
On Thu, 24 Mar 2005 12:55:09 -0600, Michael Wallace wrote:

>> I'm helping someone with an extremely weird color table
>> problem.
>
> I had a really strange color table problem on Linux. No matter what I
> did, I would only see grayscale colors. In XLOADCT, when I'd mouseover
> the colorbar all colors on the screen would flash. As soon as I moused
> out the colors outside of the IDL widget would go back to normal and the
> colors in the IDL widget would go back to gray. If this is what you
> mean by "weird color table problem," I can tell you exactly what to do
> to fix it.

I don't know how related this is to either problem, but:

Even if you are on a 24-bit X server, you can experience the
color-flashing problem that was common on 8-bit servers if you use the
DirectColor visual. When you run XLOADCT and pick a color table other
than the default, IDL is going to make an X private colormap for the
window and load it with the color table you chose. Since most X servers
and hardware are only capable of scanning the frame buffer out to the
display through a single color table, if the color table that is currently
loaded is for one client (IDL in this case), then the other clients will
"flash" and display false colors.

This is exactly the same problem that confused people on 8 bit PseudoColor
displays for so long.

Many Linux X servers provide both the TrueColor and DirectColor visuals
with either 16 or 24 bit depths, as you specify in your X config file.
IDL uses a selection algorithm that picks DirectColor over TrueColor,
unless you say otherwise. So, many people work around this problem by
using DEVICE, TRUE=24 or setting their X defaults to force the usage of a
TrueColor visual. You can't get color flashing with TrueColor, but you
can't do rapid color table animations either. An IDL color table change
requires replacing the pixels in the frame buffer, which is slower than
changing the color table. I don't know how big a deal that is for people.

All that being said, there are some serious bugs with "colormap
installation" in some of the newer Linux desktop environments. "Colormap
installation" is supposed to be handled by the window manager. If a
window has a private colormap, the window manager is supposed to make it
the active colormap when the window has focus. This is what causes the
flashing, but is necessary to ensure that the window with the focus has
the correct colors. The bug is that the window manager isn't always doing
the colormap installation, and that leaves your IDL graphics window
"grey", "no matter what you do". I've seen the problem in KDE with kwin
and also in gnome. See/Google the ICCCM for more details on the "rules".

I'm actually surprised to see the XLOADCT makes the colormap installation
happen, and I'll have to look into that. (I was able to do it on my linux
box too.) I can't get the colormap to install (flash the screen) when
doing other things in IDL. I'm sort of in the middle of looking at this
right now anyway, so any additional information would be useful.

The KDE desktop and apps all tend to use the TrueColor visual by default,
so this problem isn't a big deal to them.

Karl
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Another XML Question
Next Topic: Re: Still more fun with XML

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sun Oct 12 02:39:10 PDT 2025

Total time taken to generate the page: 2.58858 seconds