Re: pseudo transparency



Olivier Chapuis <olivier chapuis free fr> writes:

> About the E method. Here there is a de facto standard which
> uses the ESETROOT_PMAP_ID and the _XROOTPMAP_ID atoms. Maybe,
> this can be documented in the wm-spec? If I well understand
> this method, applications should use the _XROOTPMAP_ID and
> setroot programs should destroy the pixmap if
> 	ESETROOT_PMAP_ID == _XROOTPMAP_ID
> before setting the background with its own pixmap (and
> then set _XROOTPMAP_ID and also ESETROOT_PMAP_ID if its
> own pixmap can be destroyed). That's it?

A program that wants to set the background should:

 - Create a persistant pixmap by calling to the server with:

    dpy = XOpenDisplay(display_name);
    XSetCloseDownDisplay (dpy, RetainPixmap);
    pmap = XCreatePixmap (dpy, DefaultRootWindow (dpy), width, height,
                           DefaultDepthOfScreen (DefaultScreenOfDisplay (dpy)));
    XCloseDisplay (dpy)

 - Grab the server

 - See if ESETROOT_PMAP_ID is set
 - If so, call XKillClient(xdisplay, *(Pixmap*)data_esetroot)
 - Change ESETROOT_PMAP_ID and _XROOTPMAP_ID to point to the
   new pixmap
 - Set the pixmap as the background for the root window

 - Ungrab the server
 
There is no point in checking to see if ESETROOT_PMAP_ID is
equal to _XROOTPMAP_ID ... if ESETROOT_PMAP_ID is set, it
will point to a pixmap that must be killed before changing
ESETROOT_PMAP_ID.

> Now one problem with the E method is that it may need
> a lot of memory (this depends on the memory you have and

It takes _no_ extra memory. The pixmap is already referenced
by the server, all the E method does is keep around a 
XID pointing to the pixmap.

Regards,
                                        Owen



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]