refactor: propagate the event further

pull/297/head
Alex 2019-05-02 16:46:53 +02:00
parent 82bed9dd5e
commit 1e871b2353
2 changed files with 2 additions and 5 deletions

View File

@ -71,7 +71,7 @@ bool waybar::ALabel::handleToggle(GdkEventButton* const& e) {
} }
dp.emit(); dp.emit();
return true; return false;
} }
bool waybar::ALabel::handleScroll(GdkEventScroll* e) { bool waybar::ALabel::handleScroll(GdkEventScroll* e) {

View File

@ -50,13 +50,10 @@ bool waybar::modules::IdleInhibitor::handleToggle(GdkEventButton* const& e) {
waybar::Client::inst()->idle_inhibit_manager, bar_.surface); waybar::Client::inst()->idle_inhibit_manager, bar_.surface);
status_ = "activated"; status_ = "activated";
} }
if (config_["on-click"].isString() && e->button == 1) {
pid_ = waybar::util::command::forkExec(config_["on-click"].asString());
}
} else { } else {
ALabel::handleToggle(e); ALabel::handleToggle(e);
} }
dp.emit(); dp.emit();
return true; return false;
} }