tree: focus container mono child after scroll
This commit is contained in:
parent
3abd72b330
commit
fca7c7e1d2
9 changed files with 140 additions and 9 deletions
|
|
@ -2,9 +2,12 @@ use {
|
|||
crate::{
|
||||
ifs::wl_surface::xdg_surface::xdg_toplevel::XdgToplevel,
|
||||
it::{
|
||||
test_error::TestError, test_object::TestObject, test_transport::TestTransport,
|
||||
test_error::{TestError, TestResult},
|
||||
test_object::TestObject,
|
||||
test_transport::TestTransport,
|
||||
testrun::ParseFull,
|
||||
},
|
||||
tree::{ContainerNode, ToplevelNode},
|
||||
utils::buffd::MsgParser,
|
||||
wire::{xdg_toplevel::*, XdgToplevelId},
|
||||
},
|
||||
|
|
@ -36,6 +39,17 @@ impl TestXdgToplevel {
|
|||
Ok(())
|
||||
}
|
||||
|
||||
pub fn container_parent(&self) -> TestResult<Rc<ContainerNode>> {
|
||||
let parent = match self.server.tl_data().parent.get() {
|
||||
Some(p) => p,
|
||||
_ => bail!("toplevel has no parent"),
|
||||
};
|
||||
match parent.node_into_container() {
|
||||
Some(p) => Ok(p),
|
||||
_ => bail!("toplevel parent is not a container"),
|
||||
}
|
||||
}
|
||||
|
||||
fn handle_configure(&self, parser: MsgParser<'_, '_>) -> Result<(), TestError> {
|
||||
let ev = Configure::parse_full(parser)?;
|
||||
self.width.set(ev.width);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue