[comp.windows.x] X toolkit popup, colormap questions

zans02@apctrc.uucp (Alan N. Stuart) (09/24/88)

I am using X11r2 and the X toolkit and am having trouble with 
these two things.
1) how to  specify that a popup open at a pixel location 
   defined in my program.
2) how to set the colormap with a toolkit application. I have 
   tried using the XAllocColor macro to change the default 
   colormap, but my program core dumps when it hits Mainloop().

I have been using the documenation and source code provided 
with the X11r2 distribution for examples. any suggestions, 
sections of code or pointers to reading will be apreciated

Please email me.

Thank you

Alan

swick@ATHENA.MIT.EDU (Ralph R. Swick) (09/26/88)

     Date:  23 Sep 88 18:57:41 GMT
     From:  apctrc!apctrc.uucp!zans02@uunet.uu.net  (Alan N. Stuart)

     1) how to  specify that a popup open at a pixel location 
        defined in my program.

Arrange, through one of the several methods, that your resource
database contain a .geometry resource for the popup shell, or use
XtSetValues to assign the XtNgeometry resource.

     2) how to set the colormap with a toolkit application. I have 
        tried using the XAllocColor macro to change the default 
        colormap, but my program core dumps when it hits Mainloop().

XAllocColor isn't likely to be the cause of this.  In R2 there is
no convenient way to give a private colormap to a widget, so using
the DefaultColormapOfScreen() is the easiest way to go.  (You _could_
get away with using Xlib calls on the window(s) after realizing
them..)  In R3, all widgets will have an XtNcolormap resource.