mirror of
https://github.com/rad4day/Waybar.git
synced 2023-12-21 10:22:59 +01:00
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.
This commit is contained in:
parent
2c25153506
commit
7429d1f9cc
@ -214,7 +214,7 @@ Task::Task(const waybar::Bar &bar, const Json::Value &config, Taskbar *tbar,
|
||||
|
||||
/* Handle click events if configured */
|
||||
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_.signal_button_press_event().connect(
|
||||
sigc::mem_fun(*this, &Task::handle_clicked), false);
|
||||
|
Loading…
Reference in New Issue
Block a user