1
0
Fork 0
forked from wry/wry

autocommit 2022-04-18 14:14:25 CEST

This commit is contained in:
Julian Orth 2022-04-18 14:14:25 +02:00
parent 085ca95835
commit 54cf01f745
20 changed files with 155 additions and 109 deletions

View file

@ -292,6 +292,10 @@ impl SizedNode for XdgPopup {
self.xdg.surface.visible.get()
}
fn parent(&self) -> Option<Rc<dyn Node>> {
self.parent.get().and_then(|x| x.workspace.get().map(|w| w as Rc<dyn Node>))
}
fn set_visible(&self, visible: bool) {
log::info!("set visible = {}", visible);
self.xdg.set_visible(visible);

View file

@ -403,6 +403,10 @@ impl SizedNode for XdgToplevel {
self.xdg.surface.visible.get()
}
fn parent(&self) -> Option<Rc<dyn Node>> {
self.parent_node.get()
}
fn set_visible(&self, visible: bool) {
self.xdg.set_visible(visible);
self.xdg.seat_state.set_visible(self, visible);
@ -481,10 +485,6 @@ impl ToplevelNode for XdgToplevel {
&self.toplevel_data
}
fn parent(&self) -> Option<Rc<dyn Node>> {
self.parent_node.get()
}
fn as_node(&self) -> &dyn Node {
self
}

View file

@ -366,6 +366,10 @@ impl SizedNode for Xwindow {
self.surface.visible.get()
}
fn parent(&self) -> Option<Rc<dyn Node>> {
self.parent_node.get()
}
fn set_visible(&self, visible: bool) {
self.surface.node_set_visible(visible);
self.seat_state.set_visible(self, visible);
@ -463,10 +467,6 @@ impl ToplevelNode for Xwindow {
&self.toplevel_data
}
fn parent(&self) -> Option<Rc<dyn Node>> {
self.parent_node.get()
}
fn as_node(&self) -> &dyn Node {
self
}

View file

@ -381,6 +381,10 @@ impl SizedNode for ZwlrLayerSurfaceV1 {
true
}
fn parent(&self) -> Option<Rc<dyn Node>> {
Some(self.output.clone())
}
fn absolute_position(&self) -> Rect {
self.pos.get()
}