diff --git a/Cargo.lock b/Cargo.lock index 5347e552..45cdb32f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -501,7 +501,7 @@ dependencies = [ [[package]] name = "jay-compositor" -version = "1.0.2" +version = "1.0.3" dependencies = [ "ahash", "anyhow", diff --git a/Cargo.toml b/Cargo.toml index dd7a7776..1f8255bf 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "jay-compositor" -version = "1.0.2" +version = "1.0.3" edition = "2021" build = "build/build.rs" license = "GPL-3.0-only" diff --git a/src/backends/metal/video.rs b/src/backends/metal/video.rs index 47c6aaa2..2362b3d5 100644 --- a/src/backends/metal/video.rs +++ b/src/backends/metal/video.rs @@ -630,7 +630,6 @@ impl MetalConnector { .perform_render_pass(pass) .map_err(MetalError::RenderFrame)?; sync_file = buffer.copy_to_dev(sf)?; - self.next_buffer.fetch_add(1); output.perform_screencopies(&buffer.render_tex, !render_hw_cursor, 0, 0, None); fb = buffer.drm.clone(); } @@ -783,6 +782,9 @@ impl MetalConnector { Err(MetalError::Commit(e)) } else { if let Some(fb) = new_fb { + if fb.direct_scanout_data.is_none() { + self.next_buffer.fetch_add(1); + } self.next_framebuffer.set(Some(fb)); } if cursor_swap_buffer { @@ -2403,6 +2405,7 @@ impl MetalBackend { if let Some(old) = connector.buffers.set(Some(buffers)) { old_buffers.push(old); } + connector.next_buffer.set(1); connector.primary_plane.set(Some(primary_plane.clone())); if let Some(cp) = &cursor_plane { cp.assigned.set(true);