mirror of
https://github.com/rad4day/Waybar.git
synced 2023-12-21 10:22:59 +01:00
Fix workspaces not being removed from bar when moved to another output
This commit is contained in:
parent
168415440f
commit
adcd956c24
@ -42,7 +42,9 @@ auto waybar::modules::sway::Workspaces::update() -> void
|
|||||||
for (auto it = buttons_.begin(); it != buttons_.end();) {
|
for (auto it = buttons_.begin(); it != buttons_.end();) {
|
||||||
auto ws = std::find_if(workspaces_.begin(), workspaces_.end(),
|
auto ws = std::find_if(workspaces_.begin(), workspaces_.end(),
|
||||||
[it](auto node) -> bool { return node["name"].asString() == it->first; });
|
[it](auto node) -> bool { return node["name"].asString() == it->first; });
|
||||||
if (ws == workspaces_.end()) {
|
if (ws == workspaces_.end() ||
|
||||||
|
(!config_["all-outputs"].asBool() &&
|
||||||
|
(*ws)["output"].asString() != bar_.output_name)) {
|
||||||
it = buttons_.erase(it);
|
it = buttons_.erase(it);
|
||||||
needReorder = true;
|
needReorder = true;
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user