Don't remove last workspace
This commit is contained in:
parent
3ef8800fb4
commit
f189c2d49e
1 changed files with 6 additions and 4 deletions
10
src/main.rs
10
src/main.rs
|
|
@ -494,10 +494,12 @@ impl Application for App {
|
||||||
// XXX close specific workspace
|
// XXX close specific workspace
|
||||||
if let WorkspaceAmount::Static(n) = &mut self.conf.workspace_config.workspace_amount
|
if let WorkspaceAmount::Static(n) = &mut self.conf.workspace_config.workspace_amount
|
||||||
{
|
{
|
||||||
*n -= 1;
|
if *n != 1 {
|
||||||
self.conf
|
*n -= 1;
|
||||||
.cosmic_comp_config
|
self.conf
|
||||||
.set("workspaces", &self.conf.workspace_config);
|
.cosmic_comp_config
|
||||||
|
.set("workspaces", &self.conf.workspace_config);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Msg::CloseToplevel(toplevel_handle) => {
|
Msg::CloseToplevel(toplevel_handle) => {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue