scenefx
scenefx copied to clipboard
feat: add borders
TODO:
- [x] border setting
- [x] add border width to corner radius
- [x] border stencil
- [x] proper damage tracking
- [ ] support scaled and rotated outputs
- [ ] decrease buffer size by border size (otherwise the borders can mess up gaps because they increase the visual size of the surface)
- [x] remove slight rounding with corner radius of 0
will fix meson.build next commit
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
What about moving this into a sister-node to our wlr_scene_buffer as a new node type? We could provide shadow control, border x/y offset, width, height, etc without messing with the wlr_scene_buffer struct as intended by the wlroots devs:
This would allow the comp to add multiple borders as discussed earlier.
But then again, we could just add those variables to the wlr_scene_buffer struct and get the same result
What about moving this into a sister-node to our
wlr_scene_bufferas a new node type? We could provide shadow control, border x/y offset, width, height, etc without messing with thewlr_scene_bufferstruct as intended by the wlroots devs:
This would allow the comp to add multiple borders as discussed earlier.
But then again, we could just add those variables to the
wlr_scene_bufferstruct and get the same result
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
Still a bit of corner cropping, almost seems like the stencil is also applying to the surface texture
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