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