diff --git a/include/bar.hpp b/include/bar.hpp index 6900da47..43756bfd 100644 --- a/include/bar.hpp +++ b/include/bar.hpp @@ -66,7 +66,7 @@ class Bar { ~Bar(); void setMode(const std::string &mode); - void setVisible(bool visible); + void setVisible(bool value); void toggle(); void handleSignal(int); diff --git a/src/bar.cpp b/src/bar.cpp index 8c75c2c2..8a245ad1 100644 --- a/src/bar.cpp +++ b/src/bar.cpp @@ -404,7 +404,8 @@ void waybar::Bar::onMap(GdkEventAny* /*unused*/) { setPassThrough(passthrough_); } -void waybar::Bar::setVisible(bool visible) { +void waybar::Bar::setVisible(bool value) { + visible = value; if (auto mode = config.get("mode", {}); mode.isString()) { setMode(visible ? config["mode"].asString() : MODE_INVISIBLE); } else {