-
Notifications
You must be signed in to change notification settings - Fork 3
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
feat: add borders #23
base: main
Are you sure you want to change the base?
Conversation
will fix |
Need to fix a weird bug, corners of the borders don't round, and the stencil cuts out the window surface texture as well as the border area |
struct shadow_data *data = &buffer->shadow_data; | ||
if (scene_buffer_has_shadow(data)) { | ||
wlr_region_expand(&node->visible, &node->visible, data->blur_sigma); | ||
wlr_region_expand(&node->visible, &node->visible, buffer->border_size); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe check if the size is larger than 0?
types/scene/wlr_scene.c
Outdated
@@ -1124,10 +1139,54 @@ static void render_texture(struct fx_renderer *fx_renderer, struct wlr_output *o | |||
} | |||
} | |||
|
|||
static void render_border(struct fx_renderer *fx_renderer, struct wlr_output *output, | |||
pixman_region32_t *surface_damage, const struct wlr_box *surface_box, | |||
int size, float color[static 4], int corner_radius) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about passing the scene_buffer pointer instead of these three parameters?
What about moving this into a sister-node to our This would allow the comp to add multiple borders as discussed earlier. But then again, we could just add those variables to the |
Thanks for closing out this couple of items I had to do, I agree. I was actually going to suggest something similar, partly since shadows also depend on border values |
Just need to fix a corner issue and close out the scaling / rotation and this is done! |
I'll try to close out the last bit tomorrow |
Might rename the function to render_rect_around_rect, to make it less specific to borders, as compositors should be able to use it for titlebars too |
TODO: