Don't remove last workspace
This commit is contained in:
parent
3ef8800fb4
commit
f189c2d49e
1 changed files with 6 additions and 4 deletions
|
|
@ -494,12 +494,14 @@ 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
|
||||||
{
|
{
|
||||||
|
if *n != 1 {
|
||||||
*n -= 1;
|
*n -= 1;
|
||||||
self.conf
|
self.conf
|
||||||
.cosmic_comp_config
|
.cosmic_comp_config
|
||||||
.set("workspaces", &self.conf.workspace_config);
|
.set("workspaces", &self.conf.workspace_config);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
Msg::CloseToplevel(toplevel_handle) => {
|
Msg::CloseToplevel(toplevel_handle) => {
|
||||||
// TODO confirmation?
|
// TODO confirmation?
|
||||||
if let Some(toplevel_manager) = self.toplevel_manager.as_ref() {
|
if let Some(toplevel_manager) = self.toplevel_manager.as_ref() {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue