Path: utzoo!utgpu!news-server.csri.toronto.edu!mailrus!cs.utexas.edu!tut.cis.ohio-state.edu!snorkelwacker!bloom-beacon!BULLWINKLE.UNM.EDU!young From: young@BULLWINKLE.UNM.EDU (Mark Young) Newsgroups: comp.windows.x Subject: problems setting colormaps for subwindows... Message-ID: <9008150543.AA14118@bullwinkle.unm.edu> Date: 15 Aug 90 05:43:20 GMT Sender: daemon@athena.mit.edu (Mr Background) Organization: The Internet Lines: 60 Hi, We are trying to implement an application under X11R4 (patches 1 - 14) on a DecStation 3100, while running the twm window manager. In this application, we would like to have the toplevel widget with the default colormap, while several children of this toplevel widget have a different colormap. We are attempting to use the XSetWMColormapWindows() routine without much success. The ICCCM guide says that XSetWMColormapWindows() is the proper way to notify R4 window managers to install colormaps for subwindows. We are using the following routine to change the colormap for an existing widget: set_colormap(toplevel, child, colormap) Widget toplevel, child; Colormap colormap; { int i, val; Arg arg[1]; Window toplevel_window = XtWindow(toplevel), child_window = XtWindow(child); /* * Set the widget's colormap */ i = 0; XtSetArg(arg[i], XtNcolormap, colormap); i++; XtSetValues(child, arg, i); /* * Set the window's colormap and let the window manager know that * the following inferior window has a different colormap. */ XSetWindowColormap(display, child_window, colormap); if (XSetWMColormapWindows(display, toplevel_window, &child_window, 1)) printf("Colormap set for widget %s\n", XtName(child)); else printf("Failed to set colormap for widget %s\n", XtName(child)); } We always get the print statement saying that the colormap has been set; however the colormap is not being changed on the inferior window for either twm, gwm, or mwm. The colormap is installed when we use olwm. I think mwm and gwm maybe R3 based, but twm is R4 based, which the new WM routines are supposed to work for. Can anyone help clarify what's going on? Any help would be greatly appreciated. thanks in advance, Mark ps. while in dbx we notice that twm recieves the colormap changes for the inferior windows (in FetchWmColormapWindows), but doesn't seem to use it for an EnterNotify event (in InstallWindowColormap). ------------------------------------------------------------------ Mark Young young@houdini.unm.edu University of New Mexico (505) 277-5501 (work) Albuquerque, NM 87131 (505) 242-2427 (home) ------------------------------------------------------------------