mirror of
https://github.com/rad4day/Waybar.git
synced 2023-12-21 10:22:59 +01:00
refactor: get rid of some mutex
This commit is contained in:
parent
340ec7be91
commit
90a9c0e25f
@ -27,7 +27,6 @@ class AModule : public IModule {
|
||||
const Json::Value &config_;
|
||||
Gtk::EventBox event_box_;
|
||||
std::string click_param_;
|
||||
std::mutex mutex_;
|
||||
|
||||
virtual bool handleToggle(GdkEventButton *const &ev);
|
||||
virtual bool handleScroll(GdkEventScroll *);
|
||||
|
@ -88,9 +88,6 @@ AModule::SCROLL_DIR AModule::getScrollDir(GdkEventScroll* e) {
|
||||
}
|
||||
|
||||
bool AModule::handleScroll(GdkEventScroll* e) {
|
||||
// Avoid concurrent scroll event
|
||||
std::lock_guard<std::mutex> lock(mutex_);
|
||||
|
||||
auto dir = getScrollDir(e);
|
||||
if (dir == SCROLL_DIR::UP && config_["on-scroll-up"].isString()) {
|
||||
pid_.push_back(util::command::forkExec(config_["on-scroll-up"].asString()));
|
||||
|
Loading…
Reference in New Issue
Block a user