* ** HELP ** How to use other than default visual ???
@ 1993-09-18 9:34 Lukas Rosenthaler
1993-09-20 13:02 ` Andy V
1993-09-24 22:22 ` Mike Stroyan
0 siblings, 2 replies; 3+ messages in thread
From: Lukas Rosenthaler @ 1993-09-18 9:34 UTC (permalink / raw)
Again:
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"!
I added a create-callback to the Widget, and checked both resources in
there, and both are set all right (that is the XmNvisual and
XmNcolormap are ok during creation of the widget).
Can anybody help me, please. I will post any solutions
Lukas Rosenthaler
University of Basel, Scientific Photography Lab
Klingelbergstr. 80
CH-4056 Basel
Switzerland
Email:
rosenthaler@urz.unibas.ch
rosenth@vision.ethz.ch
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: ** HELP ** How to use other than default visual ???
1993-09-18 9:34 ** HELP ** How to use other than default visual ??? Lukas Rosenthaler
@ 1993-09-20 13:02 ` Andy V
1993-09-24 22:22 ` Mike Stroyan
1 sibling, 0 replies; 3+ messages in thread
From: Andy V @ 1993-09-20 13:02 UTC (permalink / raw)
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.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: ** HELP ** How to use other than default visual ???
1993-09-18 9:34 ** HELP ** How to use other than default visual ??? Lukas Rosenthaler
1993-09-20 13:02 ` Andy V
@ 1993-09-24 22:22 ` Mike Stroyan
1 sibling, 0 replies; 3+ messages in thread
From: Mike Stroyan @ 1993-09-24 22:22 UTC (permalink / raw)
Lukas Rosenthaler (rosenth@vision.ethz.ch) wrote:
: 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
You should also set "XmNdepth" to match the depth of the visual.
The Motif 1.1 release had a defect in always using pixmaps of the
default visual's depth. This made many Motif widget's get BadMatch
errors when using these pixmaps to set window backgrounds or GC tiles
for visuals with different depth than the default visual. The only fix
I know for this is to move to Motif 1.2.
--
Mike Stroyan, mike_stroyan@fc.hp.com
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~1993-09-24 22:22 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1993-09-18 9:34 ** HELP ** How to use other than default visual ??? Lukas Rosenthaler
1993-09-20 13:02 ` Andy V
1993-09-24 22:22 ` Mike Stroyan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox