Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!snorkelwacker!bloom-beacon!APPLE.COM!alan From: alan@APPLE.COM (Alan Mimms) Newsgroups: comp.windows.x Subject: xgif mods for xstdcmap servers Message-ID: <9004092302.AA08494@internal.apple.com> Date: 9 Apr 90 23:02:14 GMT Sender: daemon@athena.mit.edu (Mr Background) Organization: The Internet Lines: 44 Below are the (trivial) modifications to the xgif.c file in the xgif that I've changed to work with servers that have the standard colormaps installed (either by xstdcmap or by other means). This also assures that other clients' mucking with the colormap won't hose xgif's display... *** xgif.c Tue Mar 20 19:32:46 1990 --- xgif.c.orig Tue Mar 20 19:21:44 1990 *************** *** 92,103 **** } theScreen = DefaultScreen(theDisp); rootW = RootWindow(theDisp,theScreen); theGC = DefaultGC(theDisp,theScreen); fcol = WhitePixel(theDisp,theScreen); bcol = BlackPixel(theDisp,theScreen); theVisual = DefaultVisual(theDisp,theScreen); - theCmap = XCreateColormap (theDisp, rootW, theVisual, AllocNone); dispcells = DisplayCells(theDisp, theScreen); if (dispcells<=2) --- 92,103 ---- } theScreen = DefaultScreen(theDisp); + theCmap = DefaultColormap(theDisp, theScreen); rootW = RootWindow(theDisp,theScreen); theGC = DefaultGC(theDisp,theScreen); fcol = WhitePixel(theDisp,theScreen); bcol = BlackPixel(theDisp,theScreen); theVisual = DefaultVisual(theDisp,theScreen); dispcells = DisplayCells(theDisp, theScreen); if (dispcells<=2) *************** *** 124,130 **** CreateMainWindow(cmd,geom,argc,argv); Resize(eWIDE,eHIGH); - XSetWindowColormap (theDisp, mainW, theCmap); XSelectInput(theDisp, mainW, ExposureMask | KeyPressMask | StructureNotifyMask); --- 124,129 ----