Conversation
WillPower3309
left a comment
There was a problem hiding this comment.
Have we tested with stack / tabbed layouts with borders off (just titlebar should blur)?
| wlr_scene_blur_set_corner_radius(blur, | ||
| container_has_corner_radius(closest_con) ? corner_radius : 0, | ||
| has_titlebar ? CORNER_LOCATION_BOTTOM : CORNER_LOCATION_ALL); | ||
| enum corner_location blur_corners = has_titlebar ? CORNER_LOCATION_BOTTOM : CORNER_LOCATION_ALL; |
| bool blur_has_corner_radius = container_has_corner_radius(closest_con); | ||
| int blur_corner_radius = blur_has_corner_radius ? corner_radius : 0; | ||
| if (closest_con && closest_con->blur_border && blur_has_corner_radius) { | ||
| blur_corners = CORNER_LOCATION_ALL; | ||
| blur_corner_radius += closest_con->current.border_thickness; | ||
| } | ||
|
|
||
| wlr_scene_blur_set_corner_radius(blur, blur_corner_radius, blur_corners); |
There was a problem hiding this comment.
cleanup suggestion:
int blur_corner_radius = 0;
if (closest_con && container_has_corner_radius(closest_con)) {
blur_corner_radius = corner_radius;
if (closest_con->blur_border) {
blur_corners = CORNER_LOCATION_ALL;
blur_corner_radius += closest_con->current.border_thickness;
}
}
wlr_scene_blur_set_corner_radius(blur, blur_corner_radius, blur_corners);|
One more nit: |
I did some testing with this PR today. The current changes do not impact tabbed/stacked containers. I'm still figuring out the source code, but I think the issue is that, for tabbed/stacked windows, the titlebar is created separately as part of |
thanks! We have a similar issue here as we do for drawing shadows on tabbed / stacked containers... I don't think this is currently handled elegantly so you could either look to the shadow logic for how to do the blur or come up with something better. I suspect we can do this in the arrange_container logic by getting the y_offset of the parent container ( |
|
we'd need a rebase too! |
|
quick comment, which hopefully reduces some work, you don't want to give titlebars their own blur node, because the blur nodes will sample each other if you do that, causing a dark shadow to appear on the blur node which is scheduled last. if blur decoration is enabled you probably want it to start function alike shadows where its only enabled in the parent container and the rest is disabled.
…On May 1, 2026 11:05:03 PM GMT+02:00, Alex Friedman ***@***.***> wrote:
ahfriedman left a comment (wlrfx/swayfx#473)
> Have we tested with stack / tabbed layouts with borders off (just titlebar should blur)?
I did some testing with this PR today. The current changes do not impact tabbed/stacked containers. I'm still figuring out the source code, but I think the issue is that, for tabbed/stacked windows, the titlebar is created separately as part of `arrange_children`. As such, its extents aren't taken into account by the current code. Moreover, because the children themselves have blur, adding the code to position to blur in `arrange_children` (I suspect) would cause potential conflicts when the children themselves attempt to reposition the same blur when `arrange_container` gets called on them. As a novice, it would seem like the best solution to this might be to give the titlebars a unique blur node of their own. After all, I could see that potentially helping out PRs like #457. I'd be happy to try to play around with that idea (or any other suggestions you have to get this to work).
--
Reply to this email directly or view it on GitHub:
#473 (comment)
You are receiving this because you authored the thread.
Message ID: ***@***.***>
|
|
Thank you both! I've opened a draft PR to track the status my attempted fixes to this (#527). While the offset suggestion seems to mostly fix the issues with tabbed/stacked containers, there still is a bug that I encountered when adding the logic to handle nested tabbed/stacked containers that I havent yet figured out. If you have a few minutes, would be happy to get your thoughts on it. |


expands the Exciting and New blur node to fit whole window!