From 02ee7ff3bbd9cba72f26be7b09dde4a89fc31c21 Mon Sep 17 00:00:00 2001 From: XiaowenHu Date: Fri, 12 Apr 2024 19:01:36 +0800 Subject: [PATCH] core: remove comma from monitor description (#163) --- src/events/Events.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/events/Events.cpp b/src/events/Events.cpp index dbc43dc..fb7874c 100644 --- a/src/events/Events.cpp +++ b/src/events/Events.cpp @@ -35,8 +35,11 @@ void Events::name(void* data, wl_output* wl_output, const char* name) { void Events::description(void* data, wl_output* wl_output, const char* description) { const auto PMONITOR = (SMonitor*)data; + // remove comma character from description. This allow monitor specific rules to work on monitor with comma on their description + std::string m_description = description; + std::erase(m_description, ','); - PMONITOR->description = description; + PMONITOR->description = m_description; } void Events::handleCapabilities(void* data, wl_seat* wl_seat, uint32_t capabilities) {