: And the question is - how to draw the PNG image over the window ? : I mean that if the battery state is changed that I should draw another : image on the same position, but of course the background will not : repaint by itself.
There's a function GrClearWindow, which could force the root window to redisplay the picture... but I'm not sure that's a good idea here, since the implementation of this function would like cause the entire picture to be re-displayed, clipped to your small battery display area, which would waste tons of CPU time. If your battery area was in fact a window, with no background or border, then unmapping the window would have the same effect. If the battery were a background image on that window, it might be drawn with transparency and the whole thing handled by unmap/map of the battery window... ? I'm not sure whether we correctly handle transparency with background pixmaps... : Or I should save the image behind the battery indicator to some : offscreen pixmap and after each change of its state I should restore : the background and then draw the battery image ? That's probably a pretty good idea. I'm not sure how to handle the problem of when the root window image changes though. You'd likely have to select for root window UPDATE events. Regards, Greg --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]