it: test float restacking
This commit is contained in:
parent
9703ba8794
commit
94208691b2
6 changed files with 63 additions and 6 deletions
|
|
@ -7,7 +7,7 @@ use {
|
|||
test_transport::TestTransport,
|
||||
testrun::ParseFull,
|
||||
},
|
||||
tree::{ContainerNode, ToplevelNodeBase},
|
||||
tree::{ContainerNode, ContainingNode, FloatNode, ToplevelNodeBase},
|
||||
utils::buffd::MsgParser,
|
||||
wire::{xdg_toplevel::*, XdgToplevelId},
|
||||
},
|
||||
|
|
@ -36,16 +36,28 @@ pub struct TestXdgToplevel {
|
|||
}
|
||||
|
||||
impl TestXdgToplevel {
|
||||
pub fn container_parent(&self) -> TestResult<Rc<ContainerNode>> {
|
||||
let parent = match self.server.tl_data().parent.get() {
|
||||
Some(p) => p,
|
||||
pub fn parent(&self) -> TestResult<Rc<dyn ContainingNode>> {
|
||||
match self.server.tl_data().parent.get() {
|
||||
Some(p) => Ok(p),
|
||||
_ => bail!("toplevel has no parent"),
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
pub fn container_parent(&self) -> TestResult<Rc<ContainerNode>> {
|
||||
let parent = self.parent()?;
|
||||
match parent.node_into_container() {
|
||||
Some(p) => Ok(p),
|
||||
_ => bail!("toplevel parent is not a container"),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn float_parent(&self) -> TestResult<Rc<FloatNode>> {
|
||||
let parent = self.parent()?;
|
||||
match parent.node_into_float() {
|
||||
Some(p) => Ok(p),
|
||||
_ => bail!("toplevel parent is not a float"),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl TestXdgToplevelCore {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue