From 1fc1e4e9cbc2569eb4d3841f22020f35e9642f12 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Conzelmann?= <45296195+zephvr@users.noreply.github.com> Date: Thu, 30 Nov 2023 02:48:10 +0100 Subject: monitor: remove comma from monitor description (#3996) this allows for monitor specific rules to work on monitor with comma on their description fixes #2457 --- src/helpers/Monitor.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/helpers/Monitor.cpp') 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 +} -- cgit v1.2.3