fix(river/tags): parse hide-vacant once, not in the wl callbacks

config_["hide-vacant"].asBool() was called from the river status listeners.
When the option is given as a string ("true") jsoncpp's asBool() throws
"Value is not convertible to bool", and that exception unwinding through
libwayland's C dispatch aborts the process. Parse it once in the constructor
into a bool member (accepting the string form) and read the cached value.

Fixes #4078
This commit is contained in:
Alex
2026-07-05 23:06:37 +02:00
parent 74f0d3393a
commit 699589b66a
2 changed files with 10 additions and 3 deletions
+1
View File
@@ -38,6 +38,7 @@ class Tags : public waybar::AModule {
std::vector<Gtk::Button> buttons_;
struct zriver_output_status_v1* output_status_;
struct zriver_seat_status_v1* seat_status_;
bool hide_vacant_ = false; // parsed once; asBool() in a wl callback would throw (#4078)
};
} /* namespace waybar::modules::river */