[compiz] Question regarding window output extents

David Reveman davidr at novell.com
Wed Dec 27 10:41:47 PST 2006


On Wed, 2006-12-27 at 12:55 +0100, Danny Baumann wrote:
> Hi,
> 
> > The question now is: How can we communicate the fact that there is a
> > second set of decoration properly to other plugins so that window
> > damaging and transformation are aware of the glow? 
> > >From my understanding, the member "output" of the CompWindow structure
> > is supposed to do exactly that. But its contents get overwritten by the
> > decoration plugin on every window state change and window
> > activation/deactivation, so our plugin can't use it (and the function
> > setWindowFrameExtents) directly because the changes aren't persistent.
> 
> After some more research, I'd like to add a comment:
> As w->output really seems to be the struct responsible for what I'd like
> to do, I have a proposal for solving that problem:
> 
> - Add a wrappable notify function, called from inside
> setWindowFrameExtents - the prototype could look that way:
> 
> void windowFrameUpdateNotify (CompWindow *w, Bool inputChanged, Bool
> outputChanged);
> 
> - Plugins which want to manipulate w->input or w->output then can hook
> (AKA wrap) into this notify function and can adjust the structs to their
> needs.
> 
> - If the plugins only are allowed to enlarge w->output and not to shrink
> it, this approach is even plugin load order independant.
> 
> Questions/Remarks/Comments?

Hey Danny,

what you're suggesting is pretty much exactly what I've already done. I
just pushed out the changes for this. There's now a
getOutputExtentsForWindow function that you should wrap. It only deals
with the output extents currently but we can easily do the same thing
for the input extents if that turns out useful. I'm sure you'll easily
figure out how to use it. Look at how I modified the decoration plugin
for an example.

Making your plugin damage and transformation aware shouldn't require any
changes to the core. If you hook in at the same place as the decoration
plugin, things should just work.

Thanks,

-David



More information about the compiz mailing list