From da2ddb00ed05a772003f4d4ae5fc1156099dc66f Mon Sep 17 00:00:00 2001 From: Brenden Matthews Date: Sat, 24 Apr 2021 10:29:59 -0500 Subject: [PATCH] Partially revert change from c352069b31b2dbb4d. It's not quite clear to me what the intent was here, but I don't believe this change was correct. We shouldn't block on callbacks within the main loop. This fixes #901. --- src/conky.cc | 1 - tests/test-conky.cc | 18 ------------------ 2 files changed, 19 deletions(-) diff --git a/src/conky.cc b/src/conky.cc index a745c06b..4369d2d4 100644 --- a/src/conky.cc +++ b/src/conky.cc @@ -764,7 +764,6 @@ void evaluate(const char *text, char *p, int p_max_size) { * callbacks and generate_text_internal() after callbacks. */ extract_variable_text_internal(&subroot, text); - conky::run_all_callbacks(); generate_text_internal(p, p_max_size, subroot); DBGP2("evaluated '%s' to '%s'", text, p); diff --git a/tests/test-conky.cc b/tests/test-conky.cc index d4d632e5..8452f889 100644 --- a/tests/test-conky.cc +++ b/tests/test-conky.cc @@ -42,22 +42,4 @@ TEST_CASE("Expressions can be evaluated", "[evaluate]") { evaluate(input, result, kMaxSize); REQUIRE(strncmp(input, result, kMaxSize) == 0); } - - SECTION("execs can be evaluated") { - constexpr int kMaxSize = 50; - const char input[kMaxSize] = "${exec echo text}"; - char result[kMaxSize]{'\0'}; - - evaluate(input, result, kMaxSize); - REQUIRE(strncmp("text", result, kMaxSize) == 0); - } - - SECTION("execp echo without other substitutions can be evaluated") { - constexpr int kMaxSize = 50; - const char input[kMaxSize] = "${execp echo text}"; - char result[kMaxSize]{'\0'}; - - evaluate(input, result, kMaxSize); - REQUIRE(strncmp("text", result, kMaxSize) == 0); - } }