From 76e96cf5a0fc06bf05407e193065f3988e2bca94 Mon Sep 17 00:00:00 2001 From: Jacob Birkett Date: Thu, 8 Feb 2024 18:47:07 -0700 Subject: [PATCH] whitespace trim monitor szShortDescription --- src/helpers/Monitor.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/helpers/Monitor.cpp b/src/helpers/Monitor.cpp index c7937e011935..28c8d8bbc542 100644 --- a/src/helpers/Monitor.cpp +++ b/src/helpers/Monitor.cpp @@ -1,5 +1,7 @@ #include "Monitor.hpp" +#include "MiscFunctions.hpp" + #include "../Compositor.hpp" int ratHandler(void* data) { @@ -55,7 +57,8 @@ void CMonitor::onConnect(bool noRule) { szDescription.erase(std::remove(szDescription.begin(), szDescription.end(), ','), szDescription.end()); // field is backwards-compatible with intended usage of `szDescription` but excludes the parenthesized DRM node name suffix - szShortDescription = std::format("{} {} {}", output->make ? output->make : "", output->model ? output->model : "", output->serial ? output->serial : ""); + szShortDescription = + removeBeginEndSpacesTabs(std::format("{} {} {}", output->make ? output->make : "", output->model ? output->model : "", output->serial ? output->serial : "")); if (!wlr_backend_is_drm(output->backend)) createdByUser = true; // should be true. WL, X11 and Headless backends should be addable / removable