Removing window shape region
Adam Jackson
ajax at nwnk.net
Tue May 11 08:48:37 PDT 2010
On Tue, 2010-05-11 at 16:58 +0200, Andreas Falkenhahn wrote:
> > On Tue, 2010-05-11 at 14:25 +0200, Andreas Falkenhahn wrote:
> >> Hi,
> >>
> >> is it possible to remove a shape region that was installed using
> >> XFixesSetWindowShapeRegion()? I'm not interested in simply setting the
> >> shape region to an opaque region matching the window's bounds. I want to
> >> remove the shape region completely. I.e. after removal, the window
> >> should
> >> act as if XFixesSetWindowShapeRegion() had never been called on it. Is
> >> that possible? I tried passing "None" as region, but that doesn't seem
> >> to
> >> work.
> >
> > The server code certainly accepts (and does something different for)
> > None as the Region. Do you have a testcase, or can you better define
> > what "doesn't seem to work" means?
>
> What I meant was that calling XFixesSetWindowShapeRegion() with a None
> region didn't do anything at all. The old region simply stayed in place.
>
> Is there any documentation what is supposed to happen when passing a None
> region? Does passing None mean "remove current window shape region" or
> what is None supposed to do?
It's not especially well documented. The spec:
http://cgit.freedesktop.org/xorg/proto/fixesproto/tree/fixesproto.txt
says:
SetWindowShapeRegion
dest: Window
destKind: SHAPE_KIND
xOff, yOff: INT16
region: Region or None
This request sets the specified (by destKind) Shape extension region
of the window to region, offset by xOff and yOff. Future changes to
region have no effect on the window shape.
Which isn't really very clear. But, the ShapeRectangles and ShapeMask
requests in the Shape extension specify the None behaviour: the region
reverts to the default, ie, unshaped. So the Fixes request _should_ do
the same; anything else would just be silly.
But, like I said, the server code _does_ handle this:
http://cgit.freedesktop.org/xorg/xserver/tree/xfixes/region.c
And I can't see any paths where it would return early for None.
- ajax
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part
URL: <http://lists.x.org/archives/xorg/attachments/20100511/d31f894b/attachment.pgp>
More information about the xorg
mailing list