Skip to content

Commit 65b9295

Browse files
committed
doc: Document ignored damage
Damage that fall outside the surface is ignored.
1 parent 1c617db commit 65b9295

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/backends/wayland/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,8 @@ impl BufferInterface for BufferImpl<'_> {
268268
self.surface.damage(0, 0, i32::MAX, i32::MAX);
269269
} else {
270270
for rect in damage {
271+
// Damage that falls outside the surface is ignored.
272+
// https://wayland.freedesktop.org/docs/html/apa.html#protocol-spec-wl_surface
271273
let x = rect.x.try_into().unwrap_or(i32::MAX);
272274
let y = rect.y.try_into().unwrap_or(i32::MAX);
273275
let width = rect.width.get().try_into().unwrap_or(i32::MAX);

src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,8 @@ impl Buffer<'_> {
265265

266266
/// Presents buffer to the window, with damage regions.
267267
///
268+
/// Damage regions that fall outside the surface are ignored.
269+
///
268270
/// # Platform dependent behavior
269271
///
270272
/// Supported on:

0 commit comments

Comments
 (0)