autocommit 2022-02-17 19:12:52 CET
This commit is contained in:
parent
cf322f05be
commit
195a92d98b
29 changed files with 610 additions and 175 deletions
|
|
@ -83,6 +83,10 @@ pub trait XdgSurfaceExt: Debug {
|
|||
let _ = split;
|
||||
}
|
||||
|
||||
fn create_split(self: Rc<Self>, split: ContainerSplit) {
|
||||
let _ = split;
|
||||
}
|
||||
|
||||
fn move_focus(self: Rc<Self>, seat: &Rc<WlSeatGlobal>, direction: Direction) {
|
||||
let _ = seat;
|
||||
let _ = direction;
|
||||
|
|
@ -158,6 +162,10 @@ impl XdgSurface {
|
|||
self.ext.get().map(|e| e.set_split(split));
|
||||
}
|
||||
|
||||
pub fn create_split(&self, split: ContainerSplit) {
|
||||
self.ext.get().map(|e| e.create_split(split));
|
||||
}
|
||||
|
||||
pub fn move_focus(&self, seat: &Rc<WlSeatGlobal>, direction: Direction) {
|
||||
let ext = match self.ext.get() {
|
||||
None => return,
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue