Merge pull request #322 from RX14/feature/generic-scroll

Allow scrolling on the entire bar surface
This commit is contained in:
Alex
2019-05-17 10:03:52 +02:00
committed by GitHub
2 changed files with 7 additions and 2 deletions

View File

@ -15,6 +15,11 @@ Workspaces::Workspaces(const std::string &id, const Bar &bar, const Json::Value
ipc_.signal_event.connect(sigc::mem_fun(*this, &Workspaces::onEvent));
ipc_.signal_cmd.connect(sigc::mem_fun(*this, &Workspaces::onCmd));
ipc_.sendCmd(IPC_GET_WORKSPACES);
if (!config["disable-workspace-scroll"].asBool()) {
auto &window = const_cast<Bar&>(bar_).window;
window.add_events(Gdk::SCROLL_MASK | Gdk::SMOOTH_SCROLL_MASK);
window.signal_scroll_event().connect(sigc::mem_fun(*this, &Workspaces::handleScroll));
}
// Launch worker
worker();
}