autocommit 2022-03-24 18:27:42 CET
This commit is contained in:
parent
b3a27f889a
commit
3b1b843821
17 changed files with 388 additions and 212 deletions
|
|
@ -204,10 +204,18 @@ impl WlSeatGlobal {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn get_mono(&self) -> Option<bool> {
|
||||
self.keyboard_node.get().get_parent_mono()
|
||||
}
|
||||
|
||||
pub fn get_split(&self) -> Option<ContainerSplit> {
|
||||
self.keyboard_node.get().get_parent_split()
|
||||
}
|
||||
|
||||
pub fn set_mono(&self, mono: bool) {
|
||||
self.keyboard_node.get().set_parent_mono(mono)
|
||||
}
|
||||
|
||||
pub fn set_split(&self, axis: ContainerSplit) {
|
||||
self.keyboard_node.get().set_parent_split(axis)
|
||||
}
|
||||
|
|
|
|||
|
|
@ -641,10 +641,18 @@ impl Node for WlSurface {
|
|||
}
|
||||
}
|
||||
|
||||
fn get_parent_mono(&self) -> Option<bool> {
|
||||
self.xdg.get().and_then(|x| x.get_mono())
|
||||
}
|
||||
|
||||
fn get_parent_split(&self) -> Option<ContainerSplit> {
|
||||
self.xdg.get().and_then(|x| x.get_split())
|
||||
}
|
||||
|
||||
fn set_parent_mono(&self, mono: bool) {
|
||||
self.xdg.get().map(|x| x.set_mono(mono));
|
||||
}
|
||||
|
||||
fn set_parent_split(&self, split: ContainerSplit) {
|
||||
self.xdg.get().map(|x| x.set_split(split));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -83,10 +83,18 @@ pub trait XdgSurfaceExt: Debug {
|
|||
let _ = seat;
|
||||
}
|
||||
|
||||
fn get_mono(&self) -> Option<bool> {
|
||||
None
|
||||
}
|
||||
|
||||
fn get_split(&self) -> Option<ContainerSplit> {
|
||||
None
|
||||
}
|
||||
|
||||
fn set_mono(&self, mono: bool) {
|
||||
let _ = mono;
|
||||
}
|
||||
|
||||
fn set_split(&self, split: ContainerSplit) {
|
||||
let _ = split;
|
||||
}
|
||||
|
|
@ -166,10 +174,18 @@ impl XdgSurface {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn get_mono(&self) -> Option<bool> {
|
||||
self.ext.get().and_then(|e| e.get_mono())
|
||||
}
|
||||
|
||||
pub fn get_split(&self) -> Option<ContainerSplit> {
|
||||
self.ext.get().and_then(|e| e.get_split())
|
||||
}
|
||||
|
||||
pub fn set_mono(&self, mono: bool) {
|
||||
self.ext.get().map(|e| e.set_mono(mono));
|
||||
}
|
||||
|
||||
pub fn set_split(&self, split: ContainerSplit) {
|
||||
self.ext.get().map(|e| e.set_split(split));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -327,7 +327,7 @@ impl XdgToplevel {
|
|||
_ => return,
|
||||
};
|
||||
let extents = self.xdg.extents.get();
|
||||
parent.child_active_changed(self, self.active_surfaces.get() > 0);
|
||||
parent.clone().child_active_changed(self, self.active_surfaces.get() > 0);
|
||||
parent.child_size_changed(self, extents.width(), extents.height());
|
||||
parent.child_title_changed(self, self.title.borrow_mut().deref());
|
||||
}
|
||||
|
|
@ -503,10 +503,23 @@ impl XdgSurfaceExt for XdgToplevel {
|
|||
Self::toggle_floating(&self);
|
||||
}
|
||||
|
||||
fn get_mono(&self) -> Option<bool> {
|
||||
self.parent_node.get().and_then(|p| p.get_mono())
|
||||
}
|
||||
|
||||
fn get_split(&self) -> Option<ContainerSplit> {
|
||||
self.parent_node.get().and_then(|p| p.get_split())
|
||||
}
|
||||
|
||||
fn set_mono(&self, mono: bool) {
|
||||
let node = if mono {
|
||||
Some(self as &dyn Node)
|
||||
} else {
|
||||
None
|
||||
};
|
||||
self.parent_node.get().map(move |p| p.set_mono(node));
|
||||
}
|
||||
|
||||
fn set_split(&self, split: ContainerSplit) {
|
||||
self.parent_node.get().map(|p| p.set_split(split));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue