Changeset View
Changeset View
Standalone View
Standalone View
plugins/platforms/drm/drm_backend.cpp
Show First 20 Lines • Show All 488 Lines • ▼ Show 20 Line(s) | |||||
489 | void DrmBackend::readOutputsConfiguration() | 489 | void DrmBackend::readOutputsConfiguration() | ||
490 | { | 490 | { | ||
491 | if (m_outputs.isEmpty()) { | 491 | if (m_outputs.isEmpty()) { | ||
492 | return; | 492 | return; | ||
493 | } | 493 | } | ||
494 | const QByteArray uuid = generateOutputConfigurationUuid(); | 494 | const QByteArray uuid = generateOutputConfigurationUuid(); | ||
495 | const auto outputGroup = kwinApp()->config()->group("DrmOutputs"); | 495 | const auto outputGroup = kwinApp()->config()->group("DrmOutputs"); | ||
496 | const auto configGroup = outputGroup.group(uuid); | 496 | const auto configGroup = outputGroup.group(uuid); | ||
497 | qCDebug(KWIN_DRM) << "Reading output configuration for" << uuid; | | |||
498 | // default position goes from left to right | 497 | // default position goes from left to right | ||
499 | QPoint pos(0, 0); | 498 | QPoint pos(0, 0); | ||
500 | for (auto it = m_outputs.begin(); it != m_outputs.end(); ++it) { | 499 | for (auto it = m_outputs.begin(); it != m_outputs.end(); ++it) { | ||
500 | qCDebug(KWIN_DRM) << "Reading output configuration for [" << uuid << "] ["<< (*it)->uuid() << "]"; | ||||
501 | const auto outputConfig = configGroup.group((*it)->uuid()); | 501 | const auto outputConfig = configGroup.group((*it)->uuid()); | ||
502 | (*it)->setGlobalPos(outputConfig.readEntry<QPoint>("Position", pos)); | 502 | (*it)->setGlobalPos(outputConfig.readEntry<QPoint>("Position", pos)); | ||
503 | // TODO: add mode | 503 | // TODO: add mode | ||
504 | (*it)->setScale(outputConfig.readEntry("Scale", 1.0)); | 504 | (*it)->setScale(outputConfig.readEntry("Scale", 1.0)); | ||
505 | pos.setX(pos.x() + (*it)->geometry().width()); | 505 | pos.setX(pos.x() + (*it)->geometry().width()); | ||
506 | } | 506 | } | ||
507 | } | 507 | } | ||
508 | 508 | | |||
▲ Show 20 Lines • Show All 222 Lines • Show Last 20 Lines |