Skip to content

Commit

Permalink
Merge pull request #191 from rust-windowing/wayland-buffer-age-fix
Browse files Browse the repository at this point in the history
wayland: Fix buffer age
  • Loading branch information
ids1024 authored Jan 10, 2024
2 parents ef49741 + d26ae5b commit 2b1bb98
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/wayland/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -186,14 +186,14 @@ impl<D: HasDisplayHandle + ?Sized, W: HasWindowHandle> WaylandImpl<D, W> {
.dispatch_pending(&mut State);

if let Some((front, back)) = &mut self.buffers {
// Swap front and back buffer
std::mem::swap(front, back);

front.age = 1;
if back.age != 0 {
back.age += 1;
}

// Swap front and back buffer
std::mem::swap(front, back);

front.attach(self.surface.as_ref().unwrap());

// Like Mesa's EGL/WSI implementation, we damage the whole buffer with `i32::MAX` if
Expand Down

0 comments on commit 2b1bb98

Please sign in to comment.