fix(bspwm): Do not output empty click handlers
This commit is contained in:
parent
a6ec504513
commit
f573fcc531
@ -198,7 +198,9 @@ bool BspwmModule::build(Builder *builder, const std::string& tag)
|
||||
int workspace_n = 0;
|
||||
|
||||
for (auto &&ws : this->workspaces) {
|
||||
if (!ws.get()->label->text.empty())
|
||||
builder->cmd(Cmd::LEFT_CLICK, std::string(EVENT_CLICK) + std::to_string(++workspace_n));
|
||||
|
||||
builder->node(ws.get()->label);
|
||||
|
||||
if (ws->flag == WORKSPACE_ACTIVE && this->formatter->has(TAG_LABEL_MODE)) {
|
||||
@ -206,6 +208,7 @@ bool BspwmModule::build(Builder *builder, const std::string& tag)
|
||||
builder->node(mode->get());
|
||||
}
|
||||
|
||||
if (!ws.get()->label->text.empty())
|
||||
builder->cmd_close(true);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user