Skip to content

Commit

Permalink
Send immediate frame when testing
Browse files Browse the repository at this point in the history
It seems wlcs only sends one frame request, so we need to send that frame immediately
  • Loading branch information
Ottatop committed Jun 13, 2024
1 parent b81ec7b commit 704ab19
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/handlers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,16 @@ impl CompositorHandler for State {
)
});
}

// It seems wlcs needs immediate frame sends for client tests to work
#[cfg(feature = "testing")]
unmapped_window.send_frame(
&focused_output,
self.pinnacle.clock.now(),
Some(std::time::Duration::ZERO),
|_, _| None,
);

self.pinnacle.request_layout(&focused_output);
}
}
Expand Down

0 comments on commit 704ab19

Please sign in to comment.