Fade in/Fade out of a window with XRender and Xcomposite
Pierre Nicolas-Nicolaz
dnanar at gmail.com
Tue Feb 19 02:50:16 PST 2008
Thanks for your answer (and your patience !) Carl.
2008/2/19, Carl Worth <cworth at cworth.org>:
> With the composite extension, window contents can be redirected to
> offscreen areas and then a "compositing manager" is responsible for
> combining the final window contents. Any reasonable compositing
> manager will respect the contents of the alpha channel for any window
> that has an alpha channel, (that is, if it has an ARGB visual).
The windows that I want to deal with are created with
XCreateSimpleWindow, so no visual is specified ; does
XCreateSimpleWindow create a window with an alpha channel (if it
doesn't, i should use XCreateWindow instead and use an ARGB visual ?)
> Meanwhile, before the X Render extension, there was no support in the
> X server for usefully computing any alpha channel contents for a
> window. So the X Render extension is very useful for an application
> wanting to do interesting things with alpha. Meanwhile, the XRender
> library is very low-level and not easy to use directly. So it's often
> desirable to use a higher-level library for computing the interesting
> alpha content, (this is exactly what cairo was invented for, for
> example).
My goal is to add eye candies effects to an existing window manager
(ratpoison). I do not know any compositing manager for this window
manager (xcompmgr works with it, but i don't know if this program can
be called as a compositing manager).
So, you suggest that i should use cairo library to play with the
Pixmaps given by XComposite ? I do agree, because cairo sounds really
easier to use than XRender
>
> What's not clear to me at all is what you're wanting to do. Are you
> wanting to write an application program that will create a window that
> will fade in (by means of an existing compositing manager)? Are you
> wanting to write a new compositing manager to handle the fading in/out
> of existing program's windows? Perhaps even fading in/out windows that
> don't have any specific alpha channel?
According to what i said before, i think that i have to write an
extremely basic compositing window manager ?
>
> Perhaps you're just wanting to achieve a "window fade-in" effect and
> you have no idea whether that means writing a compositing manager or
> not?
Well, i reckon that i have an idea of how hard it can be to write a
compositing manager. Indeed, it would be great that it already exists
any compositing manager which would work with ratpoison (well the idea
sounds so "weird" that i suppose that anyone has already tried to do
this).
Thanks,
Pierre.
More information about the xorg
mailing list