bar: fix setVisible

Accidentally removed updating the visible variable
This commit is contained in:
Austin Horstman 2024-07-20 09:33:13 -05:00
parent 15e1547661
commit a544f4b2cd
No known key found for this signature in database
2 changed files with 3 additions and 2 deletions

View File

@ -66,7 +66,7 @@ class Bar {
~Bar(); ~Bar();
void setMode(const std::string &mode); void setMode(const std::string &mode);
void setVisible(bool visible); void setVisible(bool value);
void toggle(); void toggle();
void handleSignal(int); void handleSignal(int);

View File

@ -404,7 +404,8 @@ void waybar::Bar::onMap(GdkEventAny* /*unused*/) {
setPassThrough(passthrough_); setPassThrough(passthrough_);
} }
void waybar::Bar::setVisible(bool visible) { void waybar::Bar::setVisible(bool value) {
visible = value;
if (auto mode = config.get("mode", {}); mode.isString()) { if (auto mode = config.get("mode", {}); mode.isString()) {
setMode(visible ? config["mode"].asString() : MODE_INVISIBLE); setMode(visible ? config["mode"].asString() : MODE_INVISIBLE);
} else { } else {