Changeset View
Changeset View
Standalone View
Standalone View
plugins/platforms/drm/drm_backend.cpp
Show First 20 Lines • Show All 517 Lines • ▼ Show 20 Line(s) | 512 | { | |||
---|---|---|---|---|---|
518 | const auto configGroup = outputGroup.group(uuid); | 518 | const auto configGroup = outputGroup.group(uuid); | ||
519 | // default position goes from left to right | 519 | // default position goes from left to right | ||
520 | QPoint pos(0, 0); | 520 | QPoint pos(0, 0); | ||
521 | for (auto it = m_outputs.begin(); it != m_outputs.end(); ++it) { | 521 | for (auto it = m_outputs.begin(); it != m_outputs.end(); ++it) { | ||
522 | qCDebug(KWIN_DRM) << "Reading output configuration for [" << uuid << "] ["<< (*it)->uuid() << "]"; | 522 | qCDebug(KWIN_DRM) << "Reading output configuration for [" << uuid << "] ["<< (*it)->uuid() << "]"; | ||
523 | const auto outputConfig = configGroup.group((*it)->uuid()); | 523 | const auto outputConfig = configGroup.group((*it)->uuid()); | ||
524 | (*it)->setGlobalPos(outputConfig.readEntry<QPoint>("Position", pos)); | 524 | (*it)->setGlobalPos(outputConfig.readEntry<QPoint>("Position", pos)); | ||
525 | // TODO: add mode | 525 | // TODO: add mode | ||
526 | if (outputConfig.hasKey("Scale")) | ||||
526 | (*it)->setScale(outputConfig.readEntry("Scale", 1.0)); | 527 | (*it)->setScale(outputConfig.readEntry("Scale", 1.0)); | ||
davidedmundson: If we have the hasKey() check, then I don't understand why we also need to use a 0 as a special… | |||||
Because otherwise the window appears like uninitialized in practice, otherwise. This way we make sure that at least once the function is called. ::setScale does quite some calls under the hood. apol: Because otherwise the window appears like uninitialized in practice, otherwise. This way we… | |||||
:/ then it sounds like you've uncovered a bug! From AbstractOutput::setScale: m_waylandOutput->setScale(std::ceil(scale)); should work the same if not set m_waylandOutputDevice->setScaleF(scale); should work the same if not set m_xdgOutput->setLogicalSize(pixelSize() / m_scale); really really important to call once, but also called from setWaylandMode looks like it is being called correctly emit modeChanged(); Is only emitted here and not in setWaylandMode?? Probably our bug. davidedmundson: :/ then it sounds like you've uncovered a bug!
From AbstractOutput::setScale… | |||||
apol: Tried this, doesn't help. | |||||
527 | pos.setX(pos.x() + (*it)->geometry().width()); | 528 | pos.setX(pos.x() + (*it)->geometry().width()); | ||
528 | } | 529 | } | ||
529 | } | 530 | } | ||
530 | 531 | | |||
531 | QByteArray DrmBackend::generateOutputConfigurationUuid() const | 532 | QByteArray DrmBackend::generateOutputConfigurationUuid() const | ||
532 | { | 533 | { | ||
533 | auto it = m_outputs.constBegin(); | 534 | auto it = m_outputs.constBegin(); | ||
534 | if (m_outputs.size() == 1) { | 535 | if (m_outputs.size() == 1) { | ||
▲ Show 20 Lines • Show All 293 Lines • Show Last 20 Lines |
If we have the hasKey() check, then I don't understand why we also need to use a 0 as a special value for defining unset.