monitor: remove comma from monitor description (#3996)

this allows for monitor specific rules to work on monitor with comma on
their description

fixes #2457
This commit is contained in:
François Conzelmann
2023-11-30 02:48:10 +01:00
committed by GitHub
parent e1258707ad
commit 1fc1e4e9cb
6 changed files with 13 additions and 8 deletions

View File

@@ -50,6 +50,10 @@ void CMonitor::onConnect(bool noRule) {
szName = output->name;
szDescription = output->description ? output->description : "";
// remove comma character from description. This allow monitor specific rules to work on monitor with comma on their description
szDescription.erase(std::remove(szDescription.begin(), szDescription.end(), ','), szDescription.end());
if (!wlr_backend_is_drm(output->backend))
createdByUser = true; // should be true. WL, X11 and Headless backends should be addable / removable
@@ -651,4 +655,4 @@ void CMonitor::updateMatrix() {
wlr_matrix_transform(projMatrix.data(), transform);
wlr_matrix_translate(projMatrix.data(), -vecTransformedSize.x / 2.0, -vecTransformedSize.y / 2.0);
}
}
}