From 0332da0cef5080f31ca6a901a9ca3ea8e11da59f Mon Sep 17 00:00:00 2001 From: Visal Vijay Date: Wed, 25 Mar 2026 15:18:00 +0530 Subject: [PATCH 1/2] bar: warn on invalid height type in configuration --- src/bar.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/bar.cpp b/src/bar.cpp index 6a78707eb9..fe66b80645 100644 --- a/src/bar.cpp +++ b/src/bar.cpp @@ -172,6 +172,10 @@ waybar::Bar::Bar(struct waybar_output* w_output, const Json::Value& w_config) right_.set_spacing(spacing); } + if (config.isMember("height") && !config["height"].isUInt()) { + spdlog::warn("Invalid type for 'height', expected unsigned integer"); + } + height_ = config["height"].isUInt() ? config["height"].asUInt() : 0; width_ = config["width"].isUInt() ? config["width"].asUInt() : 0; From 8f7ed880c413d85fc51c13e0252d8e18fdaf827c Mon Sep 17 00:00:00 2001 From: Alex Date: Fri, 3 Jul 2026 21:49:25 +0200 Subject: [PATCH 2/2] bar: fix indentation of height type warning --- src/bar.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bar.cpp b/src/bar.cpp index 626124da35..fe44b3edda 100644 --- a/src/bar.cpp +++ b/src/bar.cpp @@ -173,7 +173,7 @@ waybar::Bar::Bar(struct waybar_output* w_output, const Json::Value& w_config) } if (config.isMember("height") && !config["height"].isUInt()) { - spdlog::warn("Invalid type for 'height', expected unsigned integer"); + spdlog::warn("Invalid type for 'height', expected unsigned integer"); } height_ = config["height"].isUInt() ? config["height"].asUInt() : 0;