[comp.windows.x.motif] topShadowPixmap resource

pasturel@sctc.com (Pierre Pasturel) (12/01/90)

When setting XmNtopShadowPixmap to NULL in my application program in order
to set XmNtopShadowColor, I get the following error message:

           X Error of failed request:  BadPixmap (invalid Pixmap parameter)
           Major opcode of failed request:  55 (X_CreateGC)
           Minor opcode of failed request:  0
           Resource id in failed request:  0x60006a
           Serial number of failed request:  296
           Current serial number in output stream:  312

When setting XmNtopShadowPixmap to NULL in my application defaults file
I don't get an error message.

Does anyone know what's going on here??

I want to set the border colors for a XmText widget which inherits the 
XmPrimitive XmNtopshadowColor and XmNtopshadowPixmap resources. The
Motif1.0 programmer's guide says to set XmNtopshadowPixmap to NULL if
the color specified by XmNtopshadowColor is to be used.

It works fine if I set it to NULL in an .Xdefaults or applicationdefaults
file, but not in my application source program.

Any help would be greatly appreciated.

Pierre
pasturel@sctc.com

slh@wolf.cs.washington.edu (Scott Heyano) (12/01/90)

In article <1990Nov30.184937.6208@sctc.com> pasturel@sctc.com (Pierre Pasturel) writes:
|When setting XmNtopShadowPixmap to NULL in my application program in order
|to set XmNtopShadowColor, I get the following error message:
|
|           X Error of failed request:  BadPixmap (invalid Pixmap parameter)
|           Major opcode of failed request:  55 (X_CreateGC)
|           Minor opcode of failed request:  0
|           Resource id in failed request:  0x60006a
|           Serial number of failed request:  296
|           Current serial number in output stream:  312
|
|When setting XmNtopShadowPixmap to NULL in my application defaults file
|I don't get an error message.
|
|Does anyone know what's going on here??
[stuff]
	Are you trying to set this when you create the widget?
	First, I don't think you need to set it to NULL to use shadowColor
	if you weren't previously using a pixmap,
	atleast I didn't need to set it.
	Also, there's this XmUNSPECIFIED_PIXMAP value for that resource,
	maybe that is what is suppose to be used instead of NULL,
	not sure though.
	Second, (not sure this is related) I get a similar error about
	window id when I try to set XmNmappedWhenManaged or 
	use XtSetMappedWhenManaged, if I try to do it before the first
	time a manage the widget, but it works fine if I do it after
	I've managed the widget once.
	Is this the way this is suppose to work,
	it doesn't sound like it from the docs.