git.lucas.co / cce-compositor
Wayland compositor (wlroots)
git clone https://git.lucas.co/cce-compositor.git

commit318d7e7e3ba87e47c8830d1bb1c2f6a64a0096f6
parentaa240c0132
authorIsaac Freund <[email protected]>
date2020-04-05 16:36
Fix overdraw of top/bottom borders

 src/output.zig | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/output.zig b/src/output.zig
index 6de956d..17557b1 100644
--- a/src/output.zig
+++ b/src/output.zig
@@ -260,7 +260,7 @@ pub const Output = struct {
         border.x = @floatToInt(c_int, ox) + view.current_box.x +
             @intCast(c_int, border_width);
         border.y = @floatToInt(c_int, oy) + view.current_box.y;
-        border.width = @intCast(c_int, view.current_box.width);
+        border.width = @intCast(c_int, view.current_box.width - border_width * 2);
         border.height = @intCast(c_int, border_width);
         scaleBox(&border, self.wlr_output.scale);
         c.wlr_render_rect(
@@ -275,7 +275,7 @@ pub const Output = struct {
             @intCast(c_int, border_width);
         border.y = @floatToInt(c_int, oy) + view.current_box.y +
             @intCast(c_int, view.current_box.height - border_width);
-        border.width = @intCast(c_int, view.current_box.width);
+        border.width = @intCast(c_int, view.current_box.width - border_width * 2);
         border.height = @intCast(c_int, border_width);
         scaleBox(&border, self.wlr_output.scale);
         c.wlr_render_rect(