[comp.windows.x] ChangeWindowAttributes

doug@jupiter.UUCP (Doug Tomm) (07/14/89)

When ChangeWindowAttributes is directed to change the background pixel
for a window, does the server attempt to free this pixel value from the
color map, or to decrement the appropriate color cell's ref count?
My inspection of the server code suggests that this is not the case.
When xsetroot -solid is invoked repeatedly with different colors, the 
old color cells are indeed freed if appropriate, but that's because
xsetroot itself takes these special pains.

TIA for any enlightenment; apologies for my own stupidity.

====================================================================
Doug Tomm
doug@jupiter.com
jupiter!doug@ucbcad.berkekey.edu

#include <standard_disclaimers.h>
#include <cute_quotation.h>

rws@EXPO.LCS.MIT.EDU (07/14/89)

    When ChangeWindowAttributes is directed to change the background pixel
    for a window, does the server attempt to free this pixel value from the
    color map, or to decrement the appropriate color cell's ref count?

No.

    When xsetroot -solid is invoked repeatedly with different colors, the 
    old color cells are indeed freed if appropriate, but that's because
    xsetroot itself takes these special pains.

Right, because it's creating resources that need to survive the lifetime of
of the client.