Skip to content

Commit

Permalink
Fix peristent class on buttons
Browse files Browse the repository at this point in the history
Fixes: Alexays#3009

Signed-off-by: Jo De Boeck <[email protected]>
  • Loading branch information
grimpy committed Mar 19, 2024
1 parent 2c927de commit 2ffd9a9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/modules/sway/workspaces.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ void Workspaces::onCmd(const struct Ipc::ipc_response &res) {
if (output.asString() == bar_.output->name) {
Json::Value v;
v["name"] = p_w_name;
v["output"] = bar_.output->name;
v["target_output"] = bar_.output->name;
v["num"] = convertWorkspaceNameToNum(p_w_name);
workspaces_.emplace_back(std::move(v));
break;
Expand All @@ -166,7 +166,7 @@ void Workspaces::onCmd(const struct Ipc::ipc_response &res) {
// Adding to all outputs
Json::Value v;
v["name"] = p_w_name;
v["output"] = "";
v["target_output"] = "";
v["num"] = convertWorkspaceNameToNum(p_w_name);
workspaces_.emplace_back(std::move(v));
}
Expand Down Expand Up @@ -313,7 +313,7 @@ auto Workspaces::update() -> void {
} else {
button.get_style_context()->remove_class("urgent");
}
if (hasFlag((*it), "target_output")) {
if ((*it)["target_output"].isString()) {
button.get_style_context()->add_class("persistent");
} else {
button.get_style_context()->remove_class("persistent");
Expand Down

0 comments on commit 2ffd9a9

Please sign in to comment.