1
0
Fork 0
forked from wry/wry

autocommit 2022-02-17 19:12:52 CET

This commit is contained in:
Julian Orth 2022-02-17 19:12:52 +01:00
parent cf322f05be
commit 195a92d98b
29 changed files with 610 additions and 175 deletions

View file

@ -373,6 +373,7 @@ impl XdgToplevel {
&workspace,
workspace.clone(),
self.clone(),
ContainerSplit::Horizontal,
));
workspace.set_container(&container);
self.parent_node.set(Some(container));
@ -492,6 +493,26 @@ impl XdgSurfaceExt for XdgToplevel {
self.parent_node.get().map(|p| p.set_split(split));
}
fn create_split(self: Rc<Self>, split: ContainerSplit) {
let ws = match self.xdg.workspace.get() {
Some(ws) => ws,
_ => return,
};
let pn = match self.parent_node.get() {
Some(pn) => pn,
_ => return,
};
let cn = Rc::new(ContainerNode::new(
&self.xdg.surface.client.state,
&ws,
pn.clone(),
self.clone(),
split,
));
self.parent_node.set(Some(cn.clone()));
pn.replace_child(&*self, cn);
}
fn move_focus(self: Rc<Self>, seat: &Rc<WlSeatGlobal>, direction: Direction) {
let pn = match self.parent_node.get() {
Some(pn) => pn,