Fix click events for the taskbar module

When only the option 'on-click-right' was set and no other 'on-click'
option than the taskbar module wouldn't register for click events and
hence those events were handled by the generic AModule::on-click code.
This code would try to start a shell with the specified command, which
wouldn't make any sense in this circumstances.

The taskbar code falsely checked for the 'on-click-left' option instead
for the 'on-click-right' when deciding to register for click events.
pull/751/head
Till Smejkal 2020-06-24 09:36:28 +02:00
parent 2c25153506
commit 7429d1f9cc
1 changed files with 1 additions and 1 deletions

View File

@ -214,7 +214,7 @@ Task::Task(const waybar::Bar &bar, const Json::Value &config, Taskbar *tbar,
/* Handle click events if configured */ /* Handle click events if configured */
if (config_["on-click"].isString() || config_["on-click-middle"].isString() if (config_["on-click"].isString() || config_["on-click-middle"].isString()
|| config_["on-click-left"].isString()) { || config_["on-click-right"].isString()) {
button_.add_events(Gdk::BUTTON_PRESS_MASK); button_.add_events(Gdk::BUTTON_PRESS_MASK);
button_.signal_button_press_event().connect( button_.signal_button_press_event().connect(
sigc::mem_fun(*this, &Task::handle_clicked), false); sigc::mem_fun(*this, &Task::handle_clicked), false);