Path: utzoo!attcan!uunet!lll-winken!ames!oliveb!apple!bloom-beacon!ROVER.UMD.EDU!jonnyg From: jonnyg@ROVER.UMD.EDU (Jon Greenblatt) Newsgroups: comp.windows.x Subject: Re: Twm... Message-ID: <8903290047.AA00269@rover.UMD.EDU> Date: 29 Mar 89 00:47:36 GMT Sender: daemon@bloom-beacon.MIT.EDU Organization: The Internet Lines: 37 Here is a fix for TWM on the IBM RT color displays. Thank you Richard Draves for supplying this. *** events.c.~1~ Sun Nov 27 14:15:39 1988 --- events.c Tue Feb 21 18:14:11 1989 *************** *** 202,214 **** void HandleColormapNotify() { #ifdef DEBUG fprintf(stderr, "ColormapNotify\n"); #endif - if (tmp_win != NULL) - XGetWindowAttributes(dpy, tmp_win->w, &tmp_win->attr); ! if (tmp_win == Focus) XInstallColormap(dpy, tmp_win->attr.colormap); } --- 202,217 ---- void HandleColormapNotify() { + XColormapEvent *cevent = (XColormapEvent *) &event; + #ifdef DEBUG fprintf(stderr, "ColormapNotify\n"); #endif ! if ((cevent->new == True) && (tmp_win != NULL)) ! tmp_win->attr.colormap = cevent->colormap; ! ! if ((cevent->state == ColormapUninstalled) && (tmp_win == Focus)) XInstallColormap(dpy, tmp_win->attr.colormap); }