morreale@laplata.scd.ucar.edu (05/04/90)
I not an X programmer and have a (hopefully) simple X question. I'm curious why the server grows in size when images are displayed on the root window. I've noticed that root images require about a Meg of space. Why doesn't the default gray stipple pattern require as much memory? Is it because the stipple pattern is a small bitmap which is remapped over the size of the screen and images are pixmaps covering the entire screen? Just curious, that's all... -PWM -- ------------------------------------------------------------------ Peter W. Morreale email: morreale@ncar.ucar.edu Nat'l Center for Atmos Research voice: (303) 497-1293 Scientific Computing Division
keith@EXPO.LCS.MIT.EDU (Keith Packard) (05/04/90)
> I'm curious why the server grows in size when images are displayed on > the root window. I've noticed that root images require about a Meg of > space. > > Why doesn't the default gray stipple pattern require as much memory? > > Is it because the stipple pattern is a small bitmap which is remapped > over the size of the screen and images are pixmaps covering the entire > screen? The short answer is: Yes. Window backgrounds can be one of two things: a solid color or a tile. The tile is the same depth as the window but can be any size. If the tile is too small, it is replicated to cover the window. If too large, it is clipped to fit. As the tile is the same depth as the window, a full-screen alternate root-window image (like xphoon) can consume quite a bit of memory on color machines (1024x860 bytes on my machine). The default root-window tile is only 4x4 pixels. You can play with xsetroot -bitmap and the files in mit/X11/bitmaps to see the effects: $ xsetroot -bitmap /usr/include/X11/bitmaps/escherknot Keith Packard MIT X Consortium