1
0
Fork 0
forked from wry/wry

portal: damage buffer before committing

This commit is contained in:
Julian Orth 2024-10-10 21:19:33 +02:00
parent 260d241f79
commit edafe16742
2 changed files with 11 additions and 0 deletions

View file

@ -661,6 +661,7 @@ impl WindowData {
buf.free.set(false);
self.surface.attach(&buf.wl);
self.surface.damage();
self.surface.commit();
}

View file

@ -27,6 +27,16 @@ impl UsrWlSurface {
});
}
pub fn damage(&self) {
self.con.request(DamageBuffer {
self_id: self.id,
x: 0,
y: 0,
width: i32::MAX,
height: i32::MAX,
});
}
pub fn frame<F>(&self, f: F)
where
F: FnOnce() + 'static,