Path: utzoo!attcan!uunet!cs.utexas.edu!wuarchive!bcm!wilkins.iaims.bcm.tmc.edu!etaylor From: etaylor@wilkins.iaims.bcm.tmc.edu (Eric Taylor) Newsgroups: comp.windows.x Subject: twm not handling XA_COLORMAP_WINDOWS Message-ID: <2373@gazette.bcm.tmc.edu> Date: 22 Oct 90 20:22:02 GMT Sender: usenet@bcm.tmc.edu Reply-To: etaylor@wilkins.iaims.bcm.tmc.edu (Eric Taylor) Lines: 44 Nntp-Posting-Host: wilkins.iaims.bcm.tmc.edu Has anyone gotten the XA_COLORMAP_WINDOWS property to work properly with twm? I do not mean XA_COLORMAP_WINDOW which works just fine. Below is a sample program that seems to work just fine for other ICCCM window managers, but not for twm: #include #include #include #include main(argc,argv) char *argv[] ; { Widget wd = XtInitialize("test","Test",NULL,0,&argc,argv) ; Colormap c1 = XCreateColormap(XtDisplay(wd),DefaultRootWindow(XtDisplay(wd)),DefaultVisualOfScreen(XtScreen(wd)),AllocNone) ; Widget w1 ; XColor col ; col.flags = DoRed | DoGreen | DoBlue ; col.red = 256 * 256 ; col.green = 256 * 100 ; col.blue = 256 * 100 ; XAllocColor(XtDisplay(wd),c1,&col) ; w1 = XtVaCreateManagedWidget("w1",coreWidgetClass,wd, XtNcolormap,c1, XtNbackground,col.pixel, XtNwidth,100, XtNheight,200, NULL) ; XtRealizeWidget(wd) ; { Widget list[2] ; list[0] = wd ; list[1] = w1 ; XtSetWMColormapWindows(wd,list,2) ; } XtMainLoop() ; } -- Eric Taylor Baylor College of Medicine etaylor@wilkins.bmc.tmc.edu (713) 798-3776