to uniquely identify screens (in QScreen::name()) add the conenctor
name and id (such as HDMI-A-1) to the model identification
Details
Details
- Reviewers
graesslin - Group Reviewers
Plasma - Commits
- R108:c304c0a69cc0: add connector name to screen model
tested a full plasma session
Diff Detail
Diff Detail
- Repository
- R108 KWin
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
plugins/platforms/drm/drm_output.cpp | ||
---|---|---|
198–249 | I would prefer a static hashmap instead of a long switch statement. Similar to how it is done in Weston. |
plugins/platforms/drm/drm_output.cpp | ||
---|---|---|
141–159 | I was more thinking of something like: static QMap<int, QByteArray> s_connectorNames = { {DRM_MODE_CONNECTOR_Unknown, QByteArrayLiteral("Unknown")}, {DRM_MODE_CONNECTOR_VGA, QByteArrayLIteral("VGA")}, // and so on... } sorry for not having bean clear enough. Didn't mean that it should be a C variant. |
plugins/platforms/drm/drm_output.cpp | ||
---|---|---|
196 | what if connector_type returns a number we don't know yet? Maybe a find would be better here with a fallback to unknown in case of not found. |
plugins/platforms/drm/drm_output.cpp | ||
---|---|---|
196 | QString connectorName = s_connectorNames.value(connector->connector_type, QByteArrayLiteral("Unknown"); |