Using "inclusive or" for format-alt-click and other click events

c.f. https://github.com/Alexays/Waybar/pull/204#discussion_r262009635

Co-Authored-By: Organic-Code <Lazarelucas@yahoo.fr>
This commit is contained in:
Jonas 2019-03-04 15:00:44 -05:00 committed by GitHub
parent d0f56b7bdd
commit 9c0c0d262e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -50,7 +50,8 @@ bool waybar::ALabel::handleToggle(GdkEventButton* const& e) {
waybar::util::command::forkExec(config_["on-click-forward"].asString());
} else if (config_["format-alt-click"].isUInt() && e->button == config_["format-alt-click"].asUInt()) {
}
if (config_["format-alt-click"].isUInt() && e->button == config_["format-alt-click"].asUInt()) {
alt_ = !alt_;
if (alt_ && config_["format-alt"].isString()) {
format_ = config_["format-alt"].asString();