| Yes, you can create 8 bit deep windows on the firefox and have it have it's
own hardware color map seperate from the 24 plane true color windows. The
default visual for 24 plane firefox's is 24 plane true color but there is also
an 8 bit pseudo color visual that is passed back in connection setup from the
server to the client. I suppose this information is kept by xlib in it's
display structure. If you use the 8 plane visual when creating your window
all will work fine.
Firefox is the first machine to offer multiple hardware color maps. I would
like to know what people's feelings are on how beneficial multiple hardware
color maps are for 24 plane systems?, 8 plane systems? Also at what cost
are multiple color maps worthwhile. In these days of cost/performance is
everything it is hard to judge the cost/benefit tradeoffs for features like
multiple hardware color maps.
Bill
|
| re: .1
That's what me customer thinks he tried. I will give you the
relevant calls that he is using to create and install the new
color map, as well as the errors he gets when running the applications.
visual_info.screen = screen;
visual_info.depth = image_depth;
visualList = XGetVisualInfo(display,VisualScreenMask |
VisualDepthMask,&visual_info, &visualsMatched);
visual = visualList[0].visual;
colormap = XCreateColormap (display, RootWindow(display,screen),
visual,
AllocNone);
XInstallColormap (display,colormap);
back_color.pixel = BlackPixel(display,screen);
trace_color.pixel=WhitePixel(display,screen);
XSetArg (create_window_arglist[4], DwtNdepth, win_depth);
XSetArg (create_window_arglist[5], DwtNcolormap, colormap);
draw = DwtWindowCreate(work_area,
"drawArea",
create_window_arglist, 6);
There are a few other Xsetarg calls which set the position
and height. Image_depth = 8, and win_depth = 8.
The error he gets is XProtocol error detected by server; parameter
mismatch. Failed request major op code 1 X_createWindow.
If you see where we went wrong Id appreciate knowing,
thanks
Bill
|
| The problem is that you are not doing anything with the visual info that
you got except creating a colormap with it. At least not showing here.
Somehow you need to tell X which visual to use when creating a new window.
I suspect that you need to find a create_window_arglist argument which
specifies the visualID. I would guess that the toolkit uses that default
visual if you don't specify it. Since you specified a colormap with
a different visual from what the window is created with, that would give
you a match error. Also, I think you would get a match error if the
depth you specified did not was not available with the specified visual.
Since you are taking the default visual, which expects 24 planes, but
specifying 8-planes, this would also generate the match error.
And finally, while it is true that the XInstallColormap is probably
the right thing to do here (since the window manager does not support
the concept of multiple active colormaps) you should be aware that
according to the InterClientCommunicationConvention manual, you are
not supposed to do InstallColormap yourself, but rather let the window
manager do it. (Trouble is, that means you have to click on the window
to get the right colors, at least in V5.1.)
If you look in the X examples conference, you can find a colorwheel
program which I posted which can demonstrate some of the techniques
required to support using the non-default visual.
Burns
|