Skip to content

Commit 55ce8e9

Browse files
committed
doc: Document ignored damage
Damage that fall outside the surface is ignored.
1 parent bc04c6e commit 55ce8e9

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
@@ -260,6 +260,8 @@ impl BufferInterface for BufferImpl<'_> {
260260
self.surface.damage(0, 0, i32::MAX, i32::MAX);
261261
} else {
262262
for rect in damage {
263+
// Damage that falls outside the surface is ignored.
264+
// https://wayland.freedesktop.org/docs/html/apa.html#protocol-spec-wl_surface
263265
let x = rect.x.try_into().unwrap_or(i32::MAX);
264266
let y = rect.y.try_into().unwrap_or(i32::MAX);
265267
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
@@ -289,6 +289,8 @@ impl Buffer<'_> {
289289

290290
/// Presents buffer to the window, with damage regions.
291291
///
292+
/// Damage regions that fall outside the surface are ignored.
293+
///
292294
/// # Platform dependent behavior
293295
///
294296
/// Supported on:

0 commit comments

Comments
 (0)