From e3fdd6d94a3e3465bd05a032b69fdeeb89744f09 Mon Sep 17 00:00:00 2001 From: Alex Date: Sun, 12 Jul 2020 11:57:47 +0200 Subject: [PATCH] fix: don't a warning for a width/height of 0 --- src/bar.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bar.cpp b/src/bar.cpp index b2e84da..3bbc2a3 100644 --- a/src/bar.cpp +++ b/src/bar.cpp @@ -121,7 +121,7 @@ void waybar::Bar::onConfigure(GdkEventConfigure* ev) { auto tmp_width = width_; if (ev->height > static_cast(height_)) { // Default minimal value - if (height_ != 1) { + if (height_ > 1) { spdlog::warn(MIN_HEIGHT_MSG, height_, ev->height); } if (config["height"].isUInt()) { @@ -132,7 +132,7 @@ void waybar::Bar::onConfigure(GdkEventConfigure* ev) { } if (ev->width > static_cast(width_)) { // Default minimal value - if (width_ != 1) { + if (width_ > 1) { spdlog::warn(MIN_WIDTH_MSG, width_, ev->width); } if (config["width"].isUInt()) {