config: add move-to-output action
This commit is contained in:
parent
2a517f437a
commit
fecfd24ba0
15 changed files with 357 additions and 76 deletions
|
|
@ -337,7 +337,7 @@ impl OutputNode {
|
|||
stacked: Default::default(),
|
||||
seat_state: Default::default(),
|
||||
name: name.to_string(),
|
||||
output_link: Cell::new(None),
|
||||
output_link: Default::default(),
|
||||
visible: Cell::new(false),
|
||||
fullscreen: Default::default(),
|
||||
visible_on_desired_output: Cell::new(false),
|
||||
|
|
@ -347,8 +347,7 @@ impl OutputNode {
|
|||
title_texture: Default::default(),
|
||||
attention_requests: Default::default(),
|
||||
});
|
||||
ws.output_link
|
||||
.set(Some(self.workspaces.add_last(ws.clone())));
|
||||
*ws.output_link.borrow_mut() = Some(self.workspaces.add_last(ws.clone()));
|
||||
self.state.workspaces.set(name.to_string(), ws.clone());
|
||||
if self.workspace.is_none() {
|
||||
self.show_workspace(&ws);
|
||||
|
|
|
|||
|
|
@ -24,7 +24,12 @@ use {
|
|||
},
|
||||
wire::JayWorkspaceId,
|
||||
},
|
||||
std::{cell::Cell, fmt::Debug, ops::Deref, rc::Rc},
|
||||
std::{
|
||||
cell::{Cell, RefCell},
|
||||
fmt::Debug,
|
||||
ops::Deref,
|
||||
rc::Rc,
|
||||
},
|
||||
};
|
||||
|
||||
tree_id!(WorkspaceNodeId);
|
||||
|
|
@ -38,7 +43,7 @@ pub struct WorkspaceNode {
|
|||
pub stacked: LinkedList<Rc<dyn StackedNode>>,
|
||||
pub seat_state: NodeSeatState,
|
||||
pub name: String,
|
||||
pub output_link: Cell<Option<LinkedNode<Rc<WorkspaceNode>>>>,
|
||||
pub output_link: RefCell<Option<LinkedNode<Rc<WorkspaceNode>>>>,
|
||||
pub visible: Cell<bool>,
|
||||
pub fullscreen: CloneCell<Option<Rc<dyn ToplevelNode>>>,
|
||||
pub visible_on_desired_output: Cell<bool>,
|
||||
|
|
@ -52,7 +57,7 @@ pub struct WorkspaceNode {
|
|||
impl WorkspaceNode {
|
||||
pub fn clear(&self) {
|
||||
self.container.set(None);
|
||||
self.output_link.set(None);
|
||||
*self.output_link.borrow_mut() = None;
|
||||
self.fullscreen.set(None);
|
||||
self.jay_workspaces.clear();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue