The problem is commit 2b552f7
which introduces a minimum interval time
of 1ms. But then, in modules/custom.cpp, the constructor tests if the
interval is nonzero to distinguish continuous workers from delay workers.
This commit is contained in:
@ -17,12 +17,17 @@ ALabel::ALabel(const Json::Value& config, const std::string& name, const std::st
|
|||||||
config["format-alt"].isString() || config["menu"].isString() || enable_click,
|
config["format-alt"].isString() || config["menu"].isString() || enable_click,
|
||||||
enable_scroll),
|
enable_scroll),
|
||||||
format_(config_["format"].isString() ? config_["format"].asString() : format),
|
format_(config_["format"].isString() ? config_["format"].asString() : format),
|
||||||
|
|
||||||
|
// Leave the default option outside of the std::max(1L, ...), because the zero value
|
||||||
|
// (default) is used in modules/custom.cpp to make the difference between
|
||||||
|
// two types of custom scripts. Fixes #4521.
|
||||||
interval_(config_["interval"] == "once"
|
interval_(config_["interval"] == "once"
|
||||||
? std::chrono::milliseconds::max()
|
? std::chrono::milliseconds::max()
|
||||||
: std::chrono::milliseconds(
|
: std::chrono::milliseconds(
|
||||||
std::max(1L, // Minimum 1ms due to millisecond precision
|
(config_["interval"].isNumeric()
|
||||||
static_cast<long>(
|
? std::max(1L, // Minimum 1ms due to millisecond precision
|
||||||
(config_["interval"].isNumeric() ? config_["interval"].asDouble() : interval) * 1000)))),
|
static_cast<long>(config_["interval"].asDouble()) * 1000)
|
||||||
|
: 1000 * (long)interval))),
|
||||||
default_format_(format_) {
|
default_format_(format_) {
|
||||||
label_.set_name(name);
|
label_.set_name(name);
|
||||||
if (!id.empty()) {
|
if (!id.empty()) {
|
||||||
|
Reference in New Issue
Block a user