From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10b6ac,8a4731f18a2c7351 X-Google-Attributes: gid10b6ac,public X-Google-Thread: 11038b,8a4731f18a2c7351 X-Google-Attributes: gid11038b,public X-Google-Thread: 1164f8,8a4731f18a2c7351 X-Google-Attributes: gid1164f8,public X-Google-ArrivalTime: 1993-09-20 06:23:07 PST Xref: gmd.de comp.sys.dec:10227 comp.windows.x.motif:13067 comp.windows.x.intrinsics:1773 Newsgroups: comp.sys.dec,comp.windows.x.motif,comp.windows.x.intrinsics Path: gmd.de!newsserver.jvnc.net!howland.reston.ans.net!europa.eng.gtefsd.com!uunet!olivea!gossip.pyramid.com!decwrl!pa.dec.com!nntpd2.cxo.dec.com!nntpd.lkg.dec.com!peavax.mlo.dec.com!bkchry!andyv From: andyv@bkchry.NOT.SET (Andy V) Subject: Re: ** HELP ** How to use other than default visual ??? Message-ID: <1993Sep20.130200.21769@peavax.mlo.dec.com> Keywords: visual color pseudocolor motif Sender: andyv@bkchry (Andy V) Reply-To: vesper@vesper.enet.dec.com Organization: Alpha Personal Systems References: Date: Mon, 20 Sep 1993 13:02:00 GMT rosenth@vision.ethz.ch (Lukas Rosenthaler) writes: >I want my OSF/Motif based application to use a non-default visual. The >machine I have has a 24 Bit truecolor display, which has to be in this mode >and can *NOT* permanently switched to PseudoColor. However, one application >absolutely needs a 8-Bit PseudoColor visual. The application uses OSF/Motif >with UIL. So far, I succeed to do the following things: >1) I find the apropriate visual >2) I can create a colormap using this visual >3) I set the "XmNvisual" and "XmNcolormap" resources of the applicationShell > to the PseudoColor visual and the 8-Bit colormap >*BUT*, within MrmFetchWidget, during fetching the XmMainWidget, the >application >dies with a BadMatch Error in a "X_CreateWindow"! In one of the more obscure features of the X Window System (tm), you also need to set the border pixel or pixmap. The default is a border pixmap of CopyFromParent; if the parent has a different depth (24-bit vs 8-bit, in this case) then its pixmap will not match your window and you get a BadMatch. This applies even if border width is zero. Everybody gets caught by this one the first time, most people get caught two or three times :-). Andy V -- Never an official DEC spokesperson.