Skip to content

Commit fdc0d52

Browse files
authored
Pass buffer damage data to orbital (#364)
1 parent 9d2e23d commit fdc0d52

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/backends/orbital.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ fn set_buffer(
241241
return;
242242
};
243243

244-
{
244+
let damage_buf = {
245245
// Map window buffer
246246
let mut window_map =
247247
unsafe { OrbitalMap::new(window_fd, window_width * window_height * 4) }
@@ -267,9 +267,10 @@ fn set_buffer(
267267
dst_row[x..x + w].copy_from_slice(&src_row[x..x + w]);
268268
}
269269

270+
format!("Y,{},{},{},{}", x, y, w, h)
270271
// Window buffer map is dropped here
271-
}
272+
};
272273

273274
// Tell orbital to show the latest window data
274-
syscall::fsync(window_fd).expect("failed to sync orbital window");
275+
syscall::write(window_fd, damage_buf.as_bytes()).expect("failed to sync orbital window");
275276
}

0 commit comments

Comments
 (0)