diff options
| author | srdusr <[email protected]> | 2026-08-30 21:15:00 +0200 |
|---|---|---|
| committer | srdusr <[email protected]> | 2026-08-30 21:15:00 +0200 |
| commit | 9a7f30050f8efc52340e698031a7a55a105e72c4 (patch) | |
| tree | 16e9becf63a51e706034bcd014320cdaafbe8b52 /crates/wayland/src/decoration/border.rs | |
| parent | f2f9ed1b3f9c49b323ce591eb72a406058d324a4 (diff) | |
| download | srdwm-main.tar.gz srdwm-main.zip | |
Diffstat (limited to 'crates/wayland/src/decoration/border.rs')
| -rw-r--r-- | crates/wayland/src/decoration/border.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crates/wayland/src/decoration/border.rs b/crates/wayland/src/decoration/border.rs index 0d7443d..fba5ce2 100644 --- a/crates/wayland/src/decoration/border.rs +++ b/crates/wayland/src/decoration/border.rs @@ -75,7 +75,7 @@ pub fn render_border_top(width: u32, thickness: u32, color: (u8, u8, u8), radius let height = thickness.max(radius as usize).max(1); let bg = rgb_to_bgra(color, 255); let mut buf = vec![0u8; width * height * 4]; - for px in buf.chunks_exact_mut(4) { + for px in buf.as_chunks_mut::<4>().0 { px.copy_from_slice(&bg); } // Without an inner ring at all, the corner stayed a solid filled disk @@ -145,7 +145,7 @@ pub fn render_border_bottom(width: u32, thickness: u32, color: (u8, u8, u8), rad let height = thickness.max(radius as usize).max(1); let bg = rgb_to_bgra(color, 255); let mut buf = vec![0u8; width * height * 4]; - for px in buf.chunks_exact_mut(4) { + for px in buf.as_chunks_mut::<4>().0 { px.copy_from_slice(&bg); } // Plain `radius`, not `radius + thickness` (what this line passed |