Larry Price wrote:

> Does anyone know why when I try display a .jpeg under X it sometimes,
> not always, but usually does this weird thing with shifting all the colors
> and generally totally garbage-izing the picture until I click on it at
> which point it snaps into place and looks like it's supposed to (which is
> to say somewhat like a blurry sketch of the original 'cuz my monitor
> sucketh hard) is it likely to be something wrong with X, the wm
> (blackbox) or libjpeg? Given that it seems to be associate with focus
> events I'm betting it's X, has anyone else seen this?

Yeah.

You have a PseudoColor visual as your default (only?) visual.  In
other words, you're using an 8 bit* colormap.  Because 256 colors is
not enough to give several colormap-aware applications sufficient
color control, the X server lets each window have a colormap
associated with it.  The server has the concept of an installed
colormap and "colormap focus".  Colormap focus is handled by the
window manager, and according to its policy (X flatly refuses to do
policy :-( ), various colormaps are installed at various times.
Usually, the window manager makes the colormap focus go to the same
window as the keyboard's focus.  IIRC, mwm would let the user
control the colormap focus policy somewhat through X resources.

If your video card is capable of doing 16, 24 or 32 bit TrueColor,
you should switch to that as your default visual.

* 8 bits is the most common colormap depth, but is not universal.
  Some SGI's have both 8 and 12 bit colormaps, and some 68k Macs can
  have 4 or even 2 bit colormaps.  X supports 'em all.  Or, rather,
  the X Server pushes the burden of supporting 'em all up to the X
  application.

  X was a great accomplishment in the early 1980s, but boy is it
  showing its age now.

-- 
Bob Miller                              K<bob>
kbobsoft software consulting
http://kbobsoft.com                     [EMAIL PROTECTED]

Reply via email to