output-configuration: Support cosmic-ext v2

This commit is contained in:
Victoria Brekenfeld 2024-11-18 21:30:02 +01:00 committed by Victoria Brekenfeld
parent 80965a61b9
commit 81b9fb179b
9 changed files with 120 additions and 25 deletions

View file

@ -405,6 +405,14 @@ impl Surface {
rx.recv().context("Surface thread died")?
}
pub fn adaptive_sync_support(&self) -> Result<VrrSupport> {
let (tx, rx) = std::sync::mpsc::sync_channel(1);
let _ = self
.thread_command
.send(ThreadCommand::AdaptiveSyncAvailable(tx));
rx.recv().context("Surface thread died")?
}
pub fn use_adaptive_sync(&mut self, vrr: AdaptiveSync) -> Result<bool> {
if vrr != AdaptiveSync::Disabled {
let (tx, rx) = std::sync::mpsc::sync_channel(1);