[compiz] On the way to theming g-w-d

David Reveman davidr at novell.com
Tue Apr 18 02:55:25 PDT 2006


On Mon, 2006-04-17 at 11:33 +0200, Thomas Liebetraut wrote:
> (This time to the mailing list, not just to David :-))
> 
> > Wrong, all things listed here can already be done with the existing
> > decoration system.
> Okay, but this would require to dynamically change the length of the
> array of quads in the property and notify libdecoration about it. But
> you're right, this one would be possible.

That's the idea. However, I can't think of a sane situation where the
property needs to be updated more often than what g-d-w is currently
doing.

> 
> > It can do all of it, perfectly.
> How is the shape of the decoration determined, then? I don't know and I
> assumed (my apologies) a "fixed" rectangular shape (For me, the rounded
> corners are just a visual effect. I can resize the window when clicking
> outside if the rounded corner (but inside the rectangle defined by the
> window's extents)).

Shape extension can be used by the decorator to set a non-rectangular
shape on the frame window. However, a rectangular input shape should
work fine for most decorations.

> And how would you implement a pattern on the decoration's border? The
> easiest example would be one of these "lolipop" patterns with
> alternating white and red lines on the vertical window borders. One of
> these color changes would be enough, if it could be repeated. But how
> can I repeat only a certain region from a texture? The texture would
> also contain all the other decoration elements, including the bottom
> corners. Is it possible to repeat only the part that belongs to the
> vertical border but still have the bottom corners on the same texture?
> (I hope this was not too confusing, my English is too bad to describe
> graphical things :-))

Here's three ways to achieve repeating patterns:

1. Set up a big number of decoration quads in the decorator which will
achieve the desired results.

2. Add a repeat attribute to the decoration property and the decoration
plugin will implicitly create all necessary quads.

3. Create a pixmap big enough to fit all decorations. To not waste any
memory, vertical borders should be stored horizontally and the matrix
bits in the decoration property should be used to map them vertically.


1 and 3 can be done today without any changes to the decoration plugin.
3 is what I recommend using and what I think is most useful for theming.
It should be possible to map any existing decoration theme system to
approach 3.

> 
> 
> > The existing decorations system can do everything you've mentioned.
> > The only thing I though about adding is a more efficient way to
> > specify repeating patterns but I wont do anything about that until we
> > have a decoration that proves it necessary.
> There is brushed metal from Aqua, if someone wants to have something
> like this. I don't know how I could do other effects without using huge
> textures, either. There was the wish for floating water in the
> decoration somewhere. I know how I can do it with the current
> single-texture method, but this would not be very efficient. As you said
> in this mail:
> http://lists.freedesktop.org/archives/compiz/2006-April/000067.html , it
> is very important to use minimal textures. If there is a decoration (for
> instance floating water or anything else that has an animated border and
> not just an animated title bar) that wants to define each pixel of the
> decoration independently, I don't see another way than using a texture
> that has the size of the window itself. And creating such a texture for
> every window on the screen could be very memory-expensive.
> If you could tell me how you would solve this problem, I'll do what I
> can to implement it in code.

See 3. from above.

-David



More information about the compiz mailing list