summaryrefslogtreecommitdiff
path: root/src/helpers/Monitor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/helpers/Monitor.cpp')
-rw-r--r--src/helpers/Monitor.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/helpers/Monitor.cpp b/src/helpers/Monitor.cpp
index f626bb3d..c1ae3503 100644
--- a/src/helpers/Monitor.cpp
+++ b/src/helpers/Monitor.cpp
@@ -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);
}
-} \ No newline at end of file
+}