autocommit 2022-04-27 18:04:02 CEST
This commit is contained in:
parent
cff35fd7da
commit
57899b3f35
14 changed files with 173 additions and 66 deletions
|
|
@ -823,7 +823,9 @@ impl ContainerNode {
|
|||
// CASE 1: This is the only child of the container. Replace the container by the child.
|
||||
if self.num_children.get() == 1 {
|
||||
let parent = self.parent.get();
|
||||
if !self.toplevel_data.is_fullscreen.get() && parent.cnode_accepts_child(child.tl_as_node()) {
|
||||
if !self.toplevel_data.is_fullscreen.get()
|
||||
&& parent.cnode_accepts_child(child.tl_as_node())
|
||||
{
|
||||
parent.cnode_replace_child(self.deref(), child.clone());
|
||||
}
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -29,7 +29,11 @@ impl PlaceholderNode {
|
|||
pub fn new_for(state: &Rc<State>, node: Rc<dyn ToplevelNode>) -> Self {
|
||||
Self {
|
||||
id: state.node_ids.next(),
|
||||
toplevel: ToplevelData::new(state, node.tl_data().title.borrow_mut().clone(), node.node_client()),
|
||||
toplevel: ToplevelData::new(
|
||||
state,
|
||||
node.tl_data().title.borrow_mut().clone(),
|
||||
node.node_client(),
|
||||
),
|
||||
destroyed: Default::default(),
|
||||
texture: Default::default(),
|
||||
}
|
||||
|
|
|
|||
|
|
@ -60,11 +60,7 @@ pub trait ToplevelNode: Node {
|
|||
let data = self.tl_data();
|
||||
if fullscreen {
|
||||
if let Some(ws) = data.workspace.get() {
|
||||
data.set_fullscreen2(
|
||||
&data.state,
|
||||
self.clone().tl_into_dyn(),
|
||||
&ws,
|
||||
);
|
||||
data.set_fullscreen2(&data.state, self.clone().tl_into_dyn(), &ws);
|
||||
}
|
||||
} else {
|
||||
data.unset_fullscreen(&data.state, self.clone().tl_into_dyn());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue