From 7429d1f9cc394a20c8d027841a171dd537be5711 Mon Sep 17 00:00:00 2001 From: Till Smejkal Date: Wed, 24 Jun 2020 09:36:28 +0200 Subject: [PATCH] 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. --- src/modules/wlr/taskbar.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/wlr/taskbar.cpp b/src/modules/wlr/taskbar.cpp index 845f07c4..361eddcf 100644 --- a/src/modules/wlr/taskbar.cpp +++ b/src/modules/wlr/taskbar.cpp @@ -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);