Every time a display gets connected/disconnected, every output will be
reinitialized. We don't really need to reset the scaling to 1 every time
we don't know, especially since the setting has been set voluntarily.
Details
- Reviewers
apol - Group Reviewers
Plasma - Commits
- R108:d3275784a85d: Don't rescale every output every time outputs change
When I disconnect the external display, my laptop doesn't fallback to scale=1.
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.
concept makes sense ++
One question below.
plugins/platforms/drm/drm_backend.cpp | ||
---|---|---|
526–527 | 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. |
plugins/platforms/drm/drm_backend.cpp | ||
---|---|---|
526–527 | 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. |
plugins/platforms/drm/drm_backend.cpp | ||
---|---|---|
526–527 | :/ 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. |
plugins/platforms/drm/drm_backend.cpp | ||
---|---|---|
526–527 | Tried this, doesn't help. |