shell: Fix incomplete focus_stack after swapping
This commit is contained in:
parent
03430b76c5
commit
4d215755f6
4 changed files with 34 additions and 3 deletions
|
|
@ -86,6 +86,7 @@ pub struct NodeDesc {
|
|||
pub handle: WorkspaceHandle,
|
||||
pub node: NodeId,
|
||||
pub stack_window: Option<CosmicSurface>,
|
||||
pub focus_stack: Vec<NodeId>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone, PartialEq)]
|
||||
|
|
@ -813,8 +814,9 @@ impl TilingLayout {
|
|||
|
||||
other.node_desc_to_focus(&NodeDesc {
|
||||
handle: other_handle.clone(),
|
||||
node: id,
|
||||
node: id.clone(),
|
||||
stack_window: None,
|
||||
focus_stack: Vec::new(), // node_desc_to_focus doesn't use this
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2564,6 +2564,7 @@ impl Shell {
|
|||
handle: from,
|
||||
node,
|
||||
stack_window: None,
|
||||
focus_stack,
|
||||
},
|
||||
direction,
|
||||
);
|
||||
|
|
|
|||
|
|
@ -974,7 +974,7 @@ impl Workspace {
|
|||
.clone()
|
||||
.map(|node_id| NodeDesc {
|
||||
handle: self.handle.clone(),
|
||||
node: node_id,
|
||||
node: node_id.clone(),
|
||||
stack_window: if mapped
|
||||
.stack_ref()
|
||||
.map(|stack| !stack.whole_stack_focused())
|
||||
|
|
@ -984,16 +984,20 @@ impl Workspace {
|
|||
} else {
|
||||
None
|
||||
},
|
||||
focus_stack: vec![node_id],
|
||||
})
|
||||
} else {
|
||||
None
|
||||
}
|
||||
})
|
||||
}
|
||||
KeyboardFocusTarget::Group(WindowGroup { node, .. }) => Some(NodeDesc {
|
||||
KeyboardFocusTarget::Group(WindowGroup {
|
||||
node, focus_stack, ..
|
||||
}) => Some(NodeDesc {
|
||||
handle: self.handle.clone(),
|
||||
node,
|
||||
stack_window: None,
|
||||
focus_stack,
|
||||
}),
|
||||
_ => None,
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue