Skip to content

Commit

Permalink
Merge pull request #146 from mahkoh/jorth/fix-explicit-sync-merging
Browse files Browse the repository at this point in the history
render: fix merging of explicit sync commits
  • Loading branch information
mahkoh authored Apr 1, 2024
2 parents 12681f4 + be965ee commit d0f124a
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/ifs/wl_surface.rs
Original file line number Diff line number Diff line change
Expand Up @@ -401,14 +401,19 @@ impl PendingState {

// overwrite state

if let Some(buffer) = next.buffer.take() {
self.buffer = Some(buffer);
self.acquire_point = next.acquire_point.take();
self.release_point = next.release_point.take();
self.explicit_sync = mem::take(&mut next.explicit_sync);
}
macro_rules! opt {
($name:ident) => {
if let Some(n) = next.$name.take() {
self.$name = Some(n);
}
};
}
opt!(buffer);
opt!(opaque_region);
opt!(input_region);
opt!(src_rect);
Expand All @@ -418,8 +423,6 @@ impl PendingState {
opt!(xwayland_serial);
opt!(tearing);
opt!(content_type);
opt!(acquire_point);
opt!(release_point);
{
let (dx1, dy1) = self.offset;
let (dx2, dy2) = mem::take(&mut next.offset);
Expand Down

0 comments on commit d0f124a

Please sign in to comment.