1
0
Fork 0
forked from wry/wry

gfx: handle context change when buffer is attached to multiple surfaces

This commit is contained in:
Julian Orth 2026-02-10 18:48:47 +01:00
parent ca5cc67fa2
commit b53f40e85f
4 changed files with 40 additions and 33 deletions

View file

@ -1481,12 +1481,14 @@ impl WlSurface {
Ok(())
}
pub fn reset_shm_textures(&self) {
pub fn reset_shm_textures(&self) -> bool {
let had_texture = self.shm_textures.front().tex.is_some();
self.shm_staging.take();
for tex in &*self.shm_textures {
tex.tex.take();
tex.damage.clear();
}
had_texture
}
fn apply_damage(&self, pending: &PendingState) {