1
0
Fork 0
forked from wry/wry

wayland: implement surface transformations

- buffer scale
- buffer transform
- viewporter
This commit is contained in:
Julian Orth 2022-05-28 18:18:29 +02:00
parent 20f0fba553
commit 95327685c1
16 changed files with 635 additions and 75 deletions

View file

@ -50,10 +50,7 @@ impl CursorSurface {
}
pub fn handle_buffer_change(&self) {
let (width, height) = match self.surface.buffer.get() {
Some(b) => (b.rect.width(), b.rect.height()),
_ => (0, 0),
};
let (width, height) = self.surface.buffer_abs_pos.get().size();
self.extents
.set(Rect::new_sized(0, 0, width, height).unwrap());
self.update_extents();