diff --git a/src/ALabel.cpp b/src/ALabel.cpp index 9787367c..a42bea74 100644 --- a/src/ALabel.cpp +++ b/src/ALabel.cpp @@ -1,6 +1,6 @@ #include "ALabel.hpp" -#include #include +#include waybar::ALabel::ALabel(const Json::Value& config, const std::string& format, uint16_t interval) : config_(config), @@ -26,7 +26,9 @@ waybar::ALabel::ALabel(const Json::Value& config, const std::string& format, uin } // configure events' user commands - if (config_["on-click"].isString() || config_["on-click-right"].isString()) { + if (config_["on-click"].isString() || config_["on-click-middle"].isString() || + config_["on-click-backward"].isString() || config_["on-click-forward"].isString() || + config_["on-click-right"].isString()) { event_box_.add_events(Gdk::BUTTON_PRESS_MASK); event_box_.signal_button_press_event().connect(sigc::mem_fun(*this, &ALabel::handleToggle)); } @@ -75,7 +77,7 @@ bool waybar::ALabel::handleToggle(GdkEventButton* const& e) { } dp.emit(); - return false; + return true; } bool waybar::ALabel::handleScroll(GdkEventScroll* e) { diff --git a/src/modules/idle_inhibitor.cpp b/src/modules/idle_inhibitor.cpp index de294722..c5c0c00c 100644 --- a/src/modules/idle_inhibitor.cpp +++ b/src/modules/idle_inhibitor.cpp @@ -51,10 +51,7 @@ bool waybar::modules::IdleInhibitor::handleToggle(GdkEventButton* const& e) { status_ = "activated"; } click_param = status_; - } else { - ALabel::handleToggle(e); } - - dp.emit(); - return false; + ALabel::handleToggle(e); + return true; }