Re: XSetBackgroundPixmap question

2012-05-21 Thread Adam Jackson
On Sat, 2012-05-19 at 23:00 +0100, Glynn Clements wrote: > I've encountered code which uses a background pixmap to implement a > persistent screen, and drawing to the pixmap then calling XClearWindow > (without calling XSetWindowBackgroundPixmap in between) results in the > updated pixmap contents

Re: XSetBackgroundPixmap question

2012-05-20 Thread walter harms
Am 20.05.2012 05:30, schrieb Keith Packard: > Glynn Clements writes: > >> That seems to imply that the X server makes a copy of the pixmap data >> rather than keeping a reference to the original pixmap. However, I >> don't believe that's how the X.org server actually implements it. > > No, it

Re: XSetBackgroundPixmap question

2012-05-19 Thread Keith Packard
Glynn Clements writes: > That seems to imply that the X server makes a copy of the pixmap data > rather than keeping a reference to the original pixmap. However, I > don't believe that's how the X.org server actually implements it. No, it keeps a reference, but not through the Pixmap ID, so whil

Re: XSetBackgroundPixmap question

2012-05-19 Thread James Buren
> The combination of the documentation and the observed behaviour > implies that the X server *may* copy the pixmap data or it may just > keep a reference. Either way, deleting the pixmap after setting it > should be fine, but modifying a pixmap which has been used as a > background pixmap has unde

Re: XSetBackgroundPixmap question

2012-05-19 Thread Keith Packard
James Buren writes: > Wow, that was fast. Thanks. Some other questions I've been having. I've been > considering using > the XRender extension and I've noticed the documentation is nearly > non-existent. What advantages > does it offer over older Xlib drawing API? At the very least, it seems to

Re: XSetBackgroundPixmap question

2012-05-19 Thread James Buren
Wow, that was fast. Thanks. Some other questions I've been having. I've been considering using the XRender extension and I've noticed the documentation is nearly non-existent. What advantages does it offer over older Xlib drawing API? At the very least, it seems to offer more complex graphics op

Re: XSetBackgroundPixmap question

2012-05-19 Thread Glynn Clements
[I presume that you mean XSetWindowBackgroundPixmap; there is no Xlib function named XSetBackgroundPixmap.] James Buren wrote: > When using this Xlib function to set a new background pixmap, how does the > old one get > freed? If I am setting the root window's background pixmap, I don't know ho

XSetBackgroundPixmap question

2012-05-19 Thread James Buren
When using this Xlib function to set a new background pixmap, how does the old one get freed? If I am setting the root window's background pixmap, I don't know how I can get the XID of the old one. If it is a window I created, I can cache it but that seems overkill if I'm just wanting to discard