image-copy: Use "buffer age" of 1 for capture

The logic `age_for_buffer` used seems to be a misinterpretation of the
protocol.

The wording is a little unclear, but it seems tracking buffer age is the
responsibility of the client, and the client is required to accumulate
damage and pass it in `damage_buffer`.

Our clients initially weren't doing that correctly. I updated
xdg-desktop-portal-cosmic to use `damage_buffer` after testing on
wlroots, and cosmic-workspaces was recently updated as well.
This commit is contained in:
Ian Douglas Scott 2025-09-17 11:40:51 -07:00 committed by Victoria Brekenfeld
parent 9bc1b6e1ee
commit e1342fb2e3
3 changed files with 6 additions and 46 deletions

View file

@ -225,7 +225,7 @@ where
// TODO re-use offscreen buffer to damage track screencopy to shm
0
} else {
session_damage_tracking.age_for_buffer(&buffer)
1
};
let mut fb = offscreen
.as_mut()