Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!cs.utexas.edu!uunet!nuchat!texhrc!ldm From: ldm@texhrc.UUCP (Lyle Meier) Newsgroups: comp.windows.x Subject: Re: Changing the default visual for Xt toolkit widgets Summary: An extremly unofficial suggestion to the visual problem with the R3 toolkit Message-ID: <345@texhrc.UUCP> Date: 29 Sep 89 02:03:43 GMT References: <8909271536.AA22775@quito.local> Organization: Texaco Houston Res. Cntr Hou, Tx Lines: 25 In article <8909271536.AA22775@quito.local>, willson@pdaeng.UUCP (Stephen Willson) writes: > Hello, > > We have just received version 1.0 of OpenLook which we are running on Sun-4s > and Sun OS 4.0.3. The default visual for the X11/News server is static > color. There is another visual which is pseudo color but it is not the > default visual. Our problem: all of our widgets get created with the default, > static color visual, and we can't find a way to tell Xt that we want to use > a different visual. We need the other visual, obviously, so that we can > have colormaps installed. We have grep'd the Xt source for X11R3 with fixes Since you have the source you could modify XtCreateWindow which does all the work for the Hp, DecWindows and Athena Toolkits in window creation, to get a pseudo color visual and pass that thru. You might save the returned depth and then dispense with the call on later calls to XtCreateWindow. This will make the static color visual invisible to Xt, and the pseudo color visual will be the one to be seen. Adding the check about depth != to 1 the code could improve efficency. Furhter you should only have to check the visual the first time, and just pass it thru there after. This will have the effect of not allowing widgets to set their visual, but should work as a kludge until R4 arrives. Lyle Meier uunet!nuchat!texhrc!ldm