Re: Client-side decorations, RGBA opaque regions

On Wednesday 25 November 2009, Cody Russell wrote:
> Hi,
> I'm working on adding support to GTK+ for doing client-side window
> decorations, and there are a couple additional hints that seem like they
> would be useful to propose.
> Part of this work is involving changing GTK+ to use RGBA windows by
> default.  For this, I'd like to propose an XserverRegion hint that
> contains a region marking what parts of the window are known to be
> opaque.  The idea being that this could be used by a WM/compositor to
> optimize which parts of the window it needs to composite, if it's useful
> to the WM/compositor (or it could be ignored; a GL compositor may not
> find this kind of information very useful, for example).  This might be

I think it would be preferable to store the rectangles directly in the

The reason is that if the window manager wants to fetch the rectangles,
it first has to make a synchronous call to fetch the ID, followed by another
synchronous call to fetch the rectangles, while it only has to make
one such call if the rectangles are stored directly in the property.

If the window manager needs an XserverRegion it would have to create
it, but this is an asynchronous call.

> The other hint that would be useful is a hint similar to
> _NET_FRAME_EXTENTS that specifies client-side drop shadow extents.  The
> main idea here being that the WM could take advantage of this to know
> where to perform window snapping for windows whose decorations and
> drop-shadows are drawn client-side.  This might be called

I think this is a good idea, but maybe it should have a more generic
name, since the client may draw something other than a shadow
around the window.

Also, while the spec doesn't say, I think the convention is that properties
set by the client start with _NET_WM, while properties set by the window
manager start with _NET.

> Lastly, after reading the documentation about _NET_FRAME_EXTENTS [1] it
> says that "the window manager MUST set _NET_FRAME_EXTENTS to the extents
> of the window's frame."  If an application is drawing the decorations,
> should it set this property?

I imagine that the window manager would set all values to 0 if it doesn't
draw the decoration itself.


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