mirror of
https://github.com/rad4day/Waybar.git
synced 2023-12-21 10:22:59 +01:00
Properly initialize distance_scrolled members.
When they were uninitialized it caused getScrollDir() to incorrectly return SCROLL_DIR::NONE in some circumstances
This commit is contained in:
parent
96caa9f094
commit
895bc878f8
@ -6,7 +6,9 @@ namespace waybar {
|
|||||||
|
|
||||||
AModule::AModule(const Json::Value& config, const std::string& name, const std::string& id,
|
AModule::AModule(const Json::Value& config, const std::string& name, const std::string& id,
|
||||||
bool enable_click, bool enable_scroll)
|
bool enable_click, bool enable_scroll)
|
||||||
: name_(std::move(name)), config_(std::move(config)) {
|
: name_(std::move(name)), config_(std::move(config))
|
||||||
|
, distance_scrolled_y_(0.0)
|
||||||
|
, distance_scrolled_x_(0.0) {
|
||||||
// configure events' user commands
|
// configure events' user commands
|
||||||
if (config_["on-click"].isString() || config_["on-click-middle"].isString() ||
|
if (config_["on-click"].isString() || config_["on-click-middle"].isString() ||
|
||||||
config_["on-click-backward"].isString() || config_["on-click-forward"].isString() ||
|
config_["on-click-backward"].isString() || config_["on-click-forward"].isString() ||
|
||||||
|
Loading…
Reference in New Issue
Block a user