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
signature.asc
Description: This is a digitally signed message part
_______________________________________________ xorg@lists.freedesktop.org: X.Org support Archives: http://lists.freedesktop.org/archives/xorg Info: http://lists.freedesktop.org/mailman/listinfo/xorg