[Xcb] Deeper pixmaps for xcb-shape masks

Javier Pollak javi.po.123 at gmail.com
Wed Sep 19 00:22:45 UTC 2018

(For those on the mailing list: see

for the reply to which I am reponding )

Thank you for the detailed response.

You have indeed understood the question perfectly and I'm a bit
disappointed at such a complicated solution being needed to accomplish this
but I guess it all makes sense. I'd like for @baskerville to at least
consider merging this future PR so for now I'll keep the patch as minimally
intrusive as possible.

Maybe if he agrees to such a change as to make bspwm reparenting I'll look
deeper into this and put the work into it. But for now, again thank you
very much for your help.

(P.S.: I pushed some new changes to my fork if you'd like to look over it.
All of the issues with the commit you commented on should be resolved.)

On Tue, Sep 18, 2018 at 3:40 AM Uli Schlachter <notifications at github.com>

> Hi again,
> I won't be able to send an answer by mail in the next few days, so I'll
> answer here. Sorry for this weird way of "mailing".
> Re: https://lists.freedesktop.org/archives/xcb/2018-September/011147.html
> If I understand this question correctly, then you are worried about
> mouse-clicks being handled as expected, i.e. when one clicks outside of the
> "rounded corner" but inside of the rectangular window bounds, the mouse
> click should go to the window below. For this, (if I remember correctly),
> version 1.1 of the SHAPE extension adds a new kind of shape: In addition to
> bounding and clip shape, there is also the input shape.
> Thus, you could do something like this:
>    - Turn bspwm into a reparenting WM (I am assuming it is not yet one)
>    - The frame window for reparenting has two childs: The actual window
>    with the client content and another window with the border *that is
>    above the content window*
>    - Draw an antialiased version of rounded corners to some pixmap with
>    the RENDER extension
>    - Any pixel with non-zero alpha is the shape of the window that things
>    are reparented to
>    - Draw an antialiased version of just the border to some pixmap with
>    the RENDER extension
>    - Any pixel with non-zero alpha in this pixmap is used for the
>    bounding shape of the border window
>    - Additionally, you actually draw this shape to the border window *while
>    honoring alpha* (i.e. this is done through the SHAPE extension)
> Thus, you end up with the parent window having a shape that includes
> anything where the window should be visible. The border window only touches
> pixels where the border is visible thanks to its shape. The anti-aliasing
> of the shape happens through the actual window content.
> Additionally, you could set the input shape of the window that things are
> reparented to. For example, anything with alpha less than 50% could be made
> click-through.
> I am not quite sure if the above answers your question. However, I am sure
> that this is way too complicated for anyone to actually want to do this.
> And of course, if no compositor is running, this fails, since then you
> cannot actually do any semi-transparency.
> Perhaps it is best not to do antialiased rounded corners. :-)
>> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <https://github.com/Javyre/bspwm/commit/94ba788802ea1d5d0e4419f7b9a357574b1e1451#commitcomment-30542158>,
> or mute the thread
> <https://github.com/notifications/unsubscribe-auth/AP9cg57sLQ9sEEudVEcUaMxlsttACRGiks5ucKNbgaJpZM4Wq7IU>
> .
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/xcb/attachments/20180918/e1706b6e/attachment.html>

More information about the Xcb mailing list