Skip to content

Commit

Permalink
AModule: retain existing default behavior when unconfigured
Browse files Browse the repository at this point in the history
  • Loading branch information
khaneliman committed Jul 2, 2024
1 parent 5d6c5ec commit fa1dd7f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/AModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ AModule::AModule(const Json::Value& config, const std::string& name, const std::
event_box_.signal_scroll_event().connect(sigc::mem_fun(*this, &AModule::handleScroll));
}

// Respect user configuration of cursor
if (config_.isMember("cursor")) {
if (config_["cursor"].isBool() && config_["cursor"].asBool()) {
setCursor(Gdk::HAND2);
Expand All @@ -77,6 +78,9 @@ AModule::AModule(const Json::Value& config, const std::string& name, const std::
} else {
spdlog::warn("unknown cursor option configured on module {}", name_);
}
} else {
// Default behavior enabling event availability
setCursor(Gdk::HAND2);
}
}

Expand Down

0 comments on commit fa1dd7f

Please sign in to comment.