home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / windows / x / 16484 < prev    next >
Encoding:
Internet Message Format  |  1992-09-10  |  2.2 KB

  1. Xref: sparky comp.windows.x:16484 comp.windows.x.motif:6112 comp.windows.x.intrinsics:258
  2. Newsgroups: comp.windows.x,comp.windows.x.motif,comp.windows.x.intrinsics
  3. Path: sparky!uunet!ods!chris
  4. From: chris@ods.com (Chris Atkins)
  5. Subject: Re: Colormap stuff
  6. Message-ID: <1992Sep10.183642.906@ods.com>
  7. Organization: Optical Data Systems, Inc.
  8. X-Newsreader: Tin 1.1 PL5
  9. References: <18lvtbINNbrc@bigboote.WPI.EDU>
  10. Date: Thu, 10 Sep 1992 18:36:42 GMT
  11. Lines: 35
  12.  
  13. Rajeev Tipnis (rtipnis@cs.wpi.edu) wrote:
  14. :     Thanks to all those who sent me mail or followed up to 
  15. :     my posting on "how to change the colormap cells on the 
  16. :     fly".
  17. :     I am including some code here, which lets the programmer
  18. :     figure, how not to touch the color cells of the colormap
  19. :     which are getting used by other applications on the same
  20. :     display, and use the rest of the colormap. 
  21. :     
  22. :     Thanks again for all your help.
  23. : SetupMyColormap()
  24. Before one thinks about using method to determine colormap cells in use, there
  25. are several points which should be brought up about it's shorcomings.
  26.  
  27. 1) The number of unused cells in the colormap and the number of read/write cells
  28.    which can be allocated is not necessarily the same number.
  29. 2) This approach makes a copy of the std colormap at an instant in time.  There    is nothing to say that clients may not have their own read/write color cells
  30.    and change them in the default map.  They would not be changed in your map 
  31.    and flashing would occur.
  32. 3) Read only color cells do not necessarily keep the same rgb value for the
  33.    lifetime of the server.  The server may free read only cells when no client
  34.    has it allocated, or as in the case of the NEWS server, the server may try to   limit flashing and modify the colormap as focus is changed.
  35. 4) The window manager handles the swapping of colormaps based on focus.  If you
  36.    are installing read/write color cells in a private map, they are not being 
  37.    installed in any other color maps which may be installed by the window 
  38.    manager.  Your application will not show up correctly when focus is changed
  39.    from your window.
  40.  
  41. In summary, X does not provide the application sufficient information to eliminate flashing whenever private colormaps are used.
  42.  
  43. Chris Atkins
  44. chris@ods.com
  45.