<div dir="ltr"><br><div dir="ltr">(For those on the mailing list: see <pre style="width:1px;height:1px"><a href="https://github.com/Javyre/bspwm/commit/94ba788802ea1d5d0e4419f7b9a357574b1e1451#r30542158" target="_blank">https://github.com/Javyre/bspwm/commit/94ba788802ea1d5d0e4419f7b9a357574b1e1451#r30542158</a> for the reply to which I am reponding )<br></pre><div><div><div><br></div><div>Thank you for the detailed response.</div><div><br></div><div>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. <br></div><div><br></div><div>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.<br></div><div><br></div><div>(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.)<br></div><div><br><div class="gmail_quote"><div dir="ltr">On Tue, Sep 18, 2018 at 3:40 AM Uli Schlachter <<a href="mailto:notifications@github.com" target="_blank">notifications@github.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><p>Hi again,</p>
<p>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".</p>
<p>Re: <a href="https://lists.freedesktop.org/archives/xcb/2018-September/011147.html" rel="nofollow" target="_blank">https://lists.freedesktop.org/archives/xcb/2018-September/011147.html</a></p>
<p>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.</p>
<p>Thus, you could do something like this:</p>
<ul><li>Turn bspwm into a reparenting WM (I am assuming it is not yet one)</li><li>The frame window for reparenting has two childs: The actual window with the client content and another window with the border <i>that is above the content window</i></li><li>Draw an antialiased version of rounded corners to some pixmap with the RENDER extension</li><li>Any pixel with non-zero alpha is the shape of the window that things are reparented to</li><li>Draw an antialiased version of just the border to some pixmap with the RENDER extension</li><li>Any pixel with non-zero alpha in this pixmap is used for the bounding shape of the border window</li><li>Additionally, you actually draw this shape to the border window <i>while honoring alpha</i> (i.e. this is done through the SHAPE extension)</li></ul>
<p>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.</p>
<p>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.</p>
<p>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.</p>
<p>Perhaps it is best not to do antialiased rounded corners. :-)</p>

<p style="font-size:small;color:rgb(102,102,102)">—<br>You are receiving this because you authored the thread.<br>Reply to this email directly, <a href="https://github.com/Javyre/bspwm/commit/94ba788802ea1d5d0e4419f7b9a357574b1e1451#commitcomment-30542158" target="_blank">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AP9cg57sLQ9sEEudVEcUaMxlsttACRGiks5ucKNbgaJpZM4Wq7IU" target="_blank">mute the thread</a>.<img src="https://github.com/notifications/beacon/AP9cg342s68r1FBHtVqnMmpvMvapqiE8ks5ucKNbgaJpZM4Wq7IU.gif" alt="" width="1" height="1"></p>

</blockquote></div></div></div></div></div></div><br><div class="gmail_quote"><div dir="ltr">On Mon, Sep 17, 2018 at 12:25 PM Javier Pollak <<a href="mailto:javi.po.123@gmail.com">javi.po.123@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto">I see..<div dir="auto"><br></div><div dir="auto">So if I wanted to have proper rounded bounding and antialiased corners, I would have to apply the bounding through shape-ext. and then reclip it in the compositor?</div><div dir="auto"><br></div>Proper bounding: having the mouse hi er over rounded corners and behave as expected<br><br><div class="gmail_quote" dir="auto"><div dir="ltr">On Sun, Sep 16, 2018, 12:20 PM Uli Schlachter, <<a href="mailto:psychon@znc.in" target="_blank">psychon@znc.in</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
On 14.09.2018 19:47, Javier Pollak wrote:<br>
> Hi, I'm working on a patch for bspwm to add rounded corners to windows and<br>
> their borders.<br>
[...]<br>
> Is there any way to remedy this?<br>
> What I tried so far is to apply an additional mask to the window background<br>
> itself since it allows for a mask of the same depth as the window.<br>
> The problem with that solution is that it does not apply to the border...<br>
<br>
If the problem is X11 window borders, then the only solution is not to<br>
use them, but to draw your own borders instead.<br>
<br>
In general, you can use alpha values through the RENDER extension for<br>
anti-aliased edges, but only if a compositing manager is running since<br>
the X11 server does not do any compositing for you.<br>
<br>
Cheers,<br>
Uli<br>
-- <br>
99 little bugs in the code<br>
99 little bugs in the code<br>
Take one down, patch it around<br>
117 little bugs in the code<br>
  -- @irqed<br><br>
</blockquote></div></div>
</blockquote></div>