nits
This commit is contained in:
1 parent
da60ecb719
commit
42f022fde5
4 files changed
+124
-120
No files matched your search
@@ -359,6 +359,33 @@ impl Default for WorkspaceSet {
|
||||
}
|
||||
|
||||
impl WorkspaceSet {
|
||||
pub fn new(
|
||||
default_layout_mode: LayoutMode,
|
||||
default_column_width: ColumnWidth,
|
||||
scrolling_focus_strategy: ViewportFocusStrategy,
|
||||
) -> Self {
|
||||
let active = WorkspaceId(1);
|
||||
let workspace = Workspace {
|
||||
id: active,
|
||||
layout: WorkspaceLayout::new(default_layout_mode, default_column_width, scrolling_focus_strategy),
|
||||
floating: Vec::new(),
|
||||
last_focused: None,
|
||||
fullscreen: None,
|
||||
};
|
||||
let workspaces = HashMap::from([(active, workspace)]);
|
||||
|
||||
Self {
|
||||
active,
|
||||
workspaces,
|
||||
window_workspaces: HashMap::new(),
|
||||
placements: HashMap::new(),
|
||||
default_layout_mode,
|
||||
default_column_width,
|
||||
scrolling_focus_strategy,
|
||||
next_id: 2,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn reconfigure_live(
|
||||
&mut self,
|
||||
mode: LayoutMode,
|
||||
@@ -428,33 +455,6 @@ impl WorkspaceSet {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn new(
|
||||
default_layout_mode: LayoutMode,
|
||||
default_column_width: ColumnWidth,
|
||||
scrolling_focus_strategy: ViewportFocusStrategy,
|
||||
) -> Self {
|
||||
let active = WorkspaceId(1);
|
||||
let workspace = Workspace {
|
||||
id: active,
|
||||
layout: WorkspaceLayout::new(default_layout_mode, default_column_width, scrolling_focus_strategy),
|
||||
floating: Vec::new(),
|
||||
last_focused: None,
|
||||
fullscreen: None,
|
||||
};
|
||||
let workspaces = HashMap::from([(active, workspace)]);
|
||||
|
||||
Self {
|
||||
active,
|
||||
workspaces,
|
||||
window_workspaces: HashMap::new(),
|
||||
placements: HashMap::new(),
|
||||
default_layout_mode,
|
||||
default_column_width,
|
||||
scrolling_focus_strategy,
|
||||
next_id: 2,
|
||||
}
|
||||
}
|
||||
|
||||
pub fn active_id(&self) -> WorkspaceId {
|
||||
self.active
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user