core: remove comma from monitor description (#163)

This commit is contained in:
XiaowenHu 2024-04-12 19:01:36 +08:00 committed by GitHub
parent 07e8e6cfd9
commit 02ee7ff3bb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 1 deletions

View File

@ -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) { void Events::description(void* data, wl_output* wl_output, const char* description) {
const auto PMONITOR = (SMonitor*)data; 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) { void Events::handleCapabilities(void* data, wl_seat* wl_seat, uint32_t capabilities) {