-
-
Notifications
You must be signed in to change notification settings - Fork 589
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[$40] Antialiased Rounded Corners #214
Comments
Just to clarify: you want compton to cut off the corners of rectangular windows so they would have rounded corners? |
(one of AwesomeWM dev here) This is a common users complaint (including other WMs like BSPWM and the patched version of i3-gaps). The ideal scenario is that the compositor (compton) take the X11 bounding mask and use it for the shadow (and add anti-aliasing to it instead of being 1 bit per pixel). AwesomeWM users work around this by using an ARGB surface with "client side decoration" (aka, titlebars on each side) made partially transparent. However that breaks compton shadows, which expect a rectangle. So they also have to use client side shadows, but that comes with their own drawbacks (tiling offsets, client snapping, maximization/fullscreen issues, etc). Other WMs users have no way to work around it at all. Simply adding rounded corner to compton would not, in itself, work. Since shadows/glows and other parts expect rectangles anyway, it will be glitchy at best. Better run an anti-aliasing algorithm on the 1bpp shape bounding mask, use this to clip the window and use an other shape tracing algorithm to shape the shadow path. Another corner case will be windows with holes in their shape. This isn't as uncommon as one might think. There is screenshot on reddit.com/r/unixporn almost every week using such setup (mostly using FVWM, AwesomeWM and WindowMaker, afaik, Plasma and Enlightenment also allow this). And if solving this sound painful and complicated, it is because it probably is. Note that I don't know the modern Compton codebase. |
@yshui Yes, exactly. Cut off corners of all windows with a radius regardless of the actual alpha mask provided by the clients behind those windows. If window is already semi-transparet (examples: @Elv13 you are right about windows with non-rectangular shape, but at the moment, I think, we can forgive about them. Usually the radius of window corners to be used is about 3 to 7 pixels and shadow radius is much bigger, so the rectangular nature of the shadow should not be so notable. What's about wmx - it's really pretty rarely used WM, at least it's users just will be able to not enable corner radius feature in compton and use it as they used it before. |
It was the most recent (24 hours ago) example on r/unixporn with holes in the bounding clip shape. There's about ~20 other in the AwesomeWM screenshot issue (click "load more" a few time). Including one by me near the top using Compton with visible artifacts. But overall I came here to "warn" about these corner (pun intended) cases so people know this isn't an easy problem and that other investigated ways to make it work before. "Really" solving the issue wont be easy at all, ancient X11 design decisions (1bpp raster bitmap maks) get in the way. Plus rounded corners are the most popular, but hexagonal corner and detached elements (like the wmx screenshot) are also good looking and used in the wild. People will bark about them even if rounded corner get AAed. |
Sure, they will, but I hope, these two things can live side a side from each other. @Elv13 Here is a preview to clarify this feature request: By the way it would be nice to make the "Zero the part of the shadow's mask behind the window." also known as |
It will be almost perfect if there will be a feature to set the radius of each corner separately from the radius of other corners to make it usable for bottom/side docks. |
@zezic is there a paypal or some other form of helping fund this request. I would like to, but have had ton of issues with bountysource in the past. Thanks for funding this. |
@tricktux I think, now it's better to ask @yshui about better ways of doing this. I just wanted to make some noise and picked what came into my mind first (Bountysource). |
@zezic Hmm, I don't know how Bountysource handle splits. Personally I think the biggest contributor to this is @sdhand and @ibhagwan, so this bounty should go to them. (And they could fight it out between themselves XD) In fact, they probably can already make the claim, since you can pretty much get rounded corners with their branches. It's just me who is being slow at adopting their changes. |
With that in mind it would probably be great to setup a sponsor page for the repo. That everyone could contribute.
|
Hmm, this project doesn't really have monetary expenses at the moment. And organizing the fund sounds like a lot of work... I'd like to hear what @tryone144 thinks about this. |
closing as done. |
This is a feature request for the antialiased rounded corners on the compositor level. They should have radius setting and window exclude/include rules like it's already done for shadows and blur. They should be able to override the alpha channel of window by multiplying it with 0 on transparent areas and also they should be able to round the top corners of WM-powered window decoration (like decorations from Openbox). They should be able not to lose the existing alpha channel of the window to make it possible to round corners of already partially-transparent windows (like terminals).
Let's try to fund the development of rounded corners: https://www.bountysource.com/issues/78071871-antialiased-rounded-corners
Thread on r/unixporn: https://www.reddit.com/r/unixporn/comments/cko6km/funding_rounded_corners/
The text was updated successfully, but these errors were encountered: