fix: workspace special wasn't removed
fixes #2505 Co-authored-by: Gabriel Fox <Inbox@GabrielFox.Dev>pull/2540/head
parent
6997b34a81
commit
6e48b236a1
|
@ -238,8 +238,10 @@ void Workspaces::create_workspace(Json::Value &value) {
|
|||
}
|
||||
|
||||
void Workspaces::remove_workspace(std::string name) {
|
||||
auto workspace = std::find_if(workspaces_.begin(), workspaces_.end(),
|
||||
[&](std::unique_ptr<Workspace> &x) { return x->name() == name; });
|
||||
auto workspace =
|
||||
std::find_if(workspaces_.begin(), workspaces_.end(), [&](std::unique_ptr<Workspace> &x) {
|
||||
return (name.starts_with("special:") && name.substr(8) == x->name()) || name == x->name();
|
||||
});
|
||||
|
||||
if (workspace == workspaces_.end()) {
|
||||
// happens when a workspace on another monitor is destroyed
|
||||
|
|
Loading…
Reference in New Issue