srdusr
aboutsummaryrefslogtreecommitdiffstats
path: root/crates/wayland/src/decoration
diff options
context:
space:
mode:
Diffstat (limited to 'crates/wayland/src/decoration')
-rw-r--r--crates/wayland/src/decoration/border.rs4
-rw-r--r--crates/wayland/src/decoration/titlebar.rs2
2 files changed, 3 insertions, 3 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
diff --git a/crates/wayland/src/decoration/titlebar.rs b/crates/wayland/src/decoration/titlebar.rs
index cc861ab..6ea2190 100644
--- a/crates/wayland/src/decoration/titlebar.rs
+++ b/crates/wayland/src/decoration/titlebar.rs
@@ -151,7 +151,7 @@ pub fn render_titlebar(
let traffic_lights = traffic_lights && !is_dialog;
let bg = rgb_to_bgra(background, 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);
}