diff --git a/include/modules/custom.hpp b/include/modules/custom.hpp index 42663fd5..7ffac3d6 100644 --- a/include/modules/custom.hpp +++ b/include/modules/custom.hpp @@ -22,6 +22,8 @@ class Custom : public ALabel { void continuousWorker(); void parseOutputRaw(); void parseOutputJson(); + bool handleScroll(GdkEventScroll* e); + bool handleToggle(GdkEventButton* const& e); const std::string name_; std::string text_; diff --git a/src/modules/custom.cpp b/src/modules/custom.cpp index 4dbb80ab..de584476 100644 --- a/src/modules/custom.cpp +++ b/src/modules/custom.cpp @@ -79,6 +79,18 @@ void waybar::modules::Custom::refresh(int sig /*signal*/) { } } +bool waybar::modules::Custom::handleScroll(GdkEventScroll* e) { + auto ret = ALabel::handleScroll(e); + thread_.wake_up(); + return ret; +} + +bool waybar::modules::Custom::handleToggle(GdkEventButton* const& e) { + auto ret = ALabel::handleToggle(e); + thread_.wake_up(); + return ret; +} + auto waybar::modules::Custom::update() -> void { // Hide label if output is empty if (config_["exec"].isString() && (output_.out.empty() || output_.exit_code != 0)) {