diff options
| author | François Conzelmann <45296195+zephvr@users.noreply.github.com> | 2023-11-30 02:48:10 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-11-30 01:48:10 +0000 |
| commit | 1fc1e4e9cbc2569eb4d3841f22020f35e9642f12 (patch) | |
| tree | e8234f8e0cc5608e7729e699fc947d1d3b864922 /src/helpers/Monitor.cpp | |
| parent | e1258707adeb3061600c43a5445063c5e3c59037 (diff) | |
monitor: remove comma from monitor description (#3996)
this allows for monitor specific rules to work on monitor with comma on
their description
fixes #2457
Diffstat (limited to 'src/helpers/Monitor.cpp')
| -rw-r--r-- | src/helpers/Monitor.cpp | 6 |
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 +} |
