1
0
Fork 0
forked from wry/wry

tree: add Node::node_output

This commit is contained in:
Julian Orth 2025-04-26 21:49:09 +02:00
parent 0dcb33ae38
commit b83bf0657b
15 changed files with 65 additions and 7 deletions

View file

@ -600,12 +600,16 @@ impl ToplevelData {
}
pub fn output(&self) -> Rc<OutputNode> {
match self.workspace.get() {
match self.output_opt() {
None => self.state.dummy_output.get().unwrap(),
Some(ws) => ws.output.get(),
Some(o) => o,
}
}
pub fn output_opt(&self) -> Option<Rc<OutputNode>> {
self.workspace.get().map(|ws| ws.output.get())
}
pub fn desired_pixel_size(&self) -> (i32, i32) {
let (dw, dh) = self.desired_extents.get().size();
if let Some(ws) = self.workspace.get() {