Ticket #10 (assigned usability)

Opened 3 years ago

Last modified 6 months ago

8-bit visuals don't work in TrueColor

Reported by: jeremyhu@… Owned by: jeremyhu@…
Priority: Nice to Have Milestone: later
Component: xserver Version: 2.1.1 (xserver-1.3)
Keywords: Cc:

Attachments

pc.c Download (4.1 KB) - added by jeremyhu@… 2 years ago.
pc.c

Change History

Changed 3 years ago by jeremyhu@…

  • owner changed from bbyer@… to jeremyhu@…
  • status changed from new to assigned
  • version changed from 2.1.0 (xserver-1.3) to 2.1.1 (xserver-1.3)

Changed 3 years ago by jeremyhu@…

  • milestone set to 2.2.0

Changed 3 years ago by jeremyhu@…

  • milestone changed from 2.2.0 to 3.0

Changed 2 years ago by jeremyhu@…

On Fri, 29 Aug 2008, Jeremy Huddleston - jeremyhu@berkeley.edu wrote:

I just want you to tell me a program that you're trying to use that doesn't work and give me the steps I need to take to execute said program and see it not working.

Okay the programs I use that need 8-bit are really huge and not open source so I put together a simple example program.

To build:

gcc pc.c -o pc -L/usr/X11/lib -lX11

To build a version with lots of debug info:

gcc -DEBUG pc.c -o pc -L/usr/X11/lib -lX11

To run:

$ ./pc
Usage ./pc class depth
 examples:
   ./pc PseudoColor 8
   ./pc TrueColor 24

With an Xserver that has a 24-bit TrueColor visual:

$ ./pc TrueColor 24

With an Xserver that has a 15-bit DirectColor visual:

$ ./pc DirectColor 15

With an Xserver that has an 8-bit PseudoColor visual:

$ ./pc PseudoColor 8

You should get a window with a line or two for 10 seconds and then the window will disapper.

mzs

PS: Right now you get the expected "visual not found" error when you try to run it with PseudoColor 8-bit because the XMatchVisualInfo() fails. But when I run in an 8-bit Xvnc server that works fine, as does my legacy 8-bit X11 app.

PPS: This sample pc program is so simple it does not repaint or anything. It is best to have X11.app and the window manager already running and not have anything cover the window that pops-up. Otherwise you may get a really strange window pop-up.

Changed 2 years ago by jeremyhu@…

  • attachment pc.c Download added

pc.c

Changed 2 years ago by jeremyhu@…

Ok, so now I understand this a bit more. You actually need an 8bit Pseudocolor visual. The server itself doesn't need to be 8bit (but in Tiger, setting the server to 8bit enabled the 8bit Pseudocolor visual).

Changed 2 years ago by jeremyhu@…

  • summary changed from 8-bit color mode doesn't work to 8-bit visuals don't work in TrueColor

git has code to enable a 256 color server, but 8bit visuals in TrueColor is still broken.

Changed 13 months ago by jeremyhu@…

pc.c is buggy! ugg. I've been using this to debug, and it is certainly buggy. It causes an 8bit Xserver on linux to go black while running. The reason is that it completely changes the colormap to the one created (which is undefined). Furthermore, it uses the white/black pixel values as sepcified in the screen's default color map rather than the window's color map.

Note: See TracTickets for help on using tickets.