1
0
Fork 0
forked from wry/wry

cli: allow overriding non-desktop setting

This commit is contained in:
Julian Orth 2024-04-25 18:39:29 +02:00
parent 24d08918c4
commit 1f18b46135
5 changed files with 84 additions and 7 deletions

View file

@ -284,6 +284,19 @@ impl JayRandrRequestHandler for JayRandr {
c.connector.set_enabled(req.enabled != 0);
Ok(())
}
fn set_non_desktop(&self, req: SetNonDesktop<'_>, _slf: &Rc<Self>) -> Result<(), Self::Error> {
let Some(c) = self.get_connector(req.output) else {
return Ok(());
};
let non_desktop = match req.non_desktop {
0 => None,
1 => Some(false),
_ => Some(true),
};
c.connector.set_non_desktop_override(non_desktop);
Ok(())
}
}
object_base! {