[forum] X-Transparency
Scott Brumbaugh
forum@XFree86.Org
Thu, 20 Mar 2003 13:59:16 -0800 (PST)
Hi,
I saw that window translucency is on the X 5.0 TODO list so I thought
I would post this message for anyone who is interested in this
particular topic.
A few months ago I used XDirectFB to develop an experimental X
protocol extension called X-Transparency. This extension allows any
xclient to control the opacity of its or any other x client's top
level x window. The extension is general and requires that an Xserver
provide callbacks to the protocol to control a top-level window's
transparency. With XDirectFB these callbacks are simple wrappers
around the corresponding DirectFB api calls.
The X-Transparency API is pretty simple, you use
XSetOpacity( dpy, win, value );
to change a windows opacity, and
XGetOpacity( dpy, win, &value );
to get it. The extension is available in the directfb cvs under
XDirectFB/xc-transparency-extension.diff
More recently, I have patched the Sawfish window manager to use this
extension. With this patched Sawfish, a user can continuously vary
window transparency by ctrl-mouse dragging on the title bar of any x
window. I picked Sawfish for this prototype because it was relatively
easy to write librep wrappers around the XGet/XSetOpacity calls.
After that it was also easy to write lisp functions to change window
transparency and bind these to mouse events.
Here is a pointer to the original X-Transparency extension patch which
is obsoleted by the current xdirectfb cvs:
http://directfb.org/mailinglists/directfb-dev/2002/12-2002/msg00136.html
Here is a pointer to the latest Sawfish patch, this patch is not in cvs:
http://directfb.org/mailinglists/directfb-dev/2003/03-2003/msg00133.html
Scott Brumbaugh