diff --git a/backends/kwayland/waylandconfig.cpp b/backends/kwayland/waylandconfig.cpp --- a/backends/kwayland/waylandconfig.cpp +++ b/backends/kwayland/waylandconfig.cpp @@ -236,7 +236,7 @@ void WaylandConfig::updateKScreenConfig(KScreen::ConfigPtr &config) const { - auto features = Config::Feature::Writable; + auto features = Config::Feature::Writable | Config::Feature::PerOutputScaling; config->setSupportedFeatures(features); config->setValid(m_connection->display()); KScreen::ScreenPtr screen = config->screen(); @@ -297,6 +297,10 @@ wlOutputConfiguration->setPosition(o_old->outputDevice(), output->pos()); } + if (device->scale() != output->scale()) { + wlOutputConfiguration->setScale(o_old->outputDevice(), output->scale()); + } + // rotation auto r_current = o_old->toKScreenRotation(device->transform()); auto r_new = output->rotation(); @@ -311,8 +315,6 @@ if (w_newmodeid != w_currentmodeid) { wlOutputConfiguration->setMode(device, w_newmodeid); } - - // FIXME: scale } // We now block changes in order to compress events while the compositor is doing its thing diff --git a/backends/kwayland/waylandscreen.cpp b/backends/kwayland/waylandscreen.cpp --- a/backends/kwayland/waylandscreen.cpp +++ b/backends/kwayland/waylandscreen.cpp @@ -49,7 +49,7 @@ QRect r; Q_FOREACH (auto o, outputs) { if (o->enabled()) { - r |= QRect(o->outputDevice()->globalPosition(), o->outputDevice()->pixelSize()); + r |= QRect(o->outputDevice()->globalPosition(), o->outputDevice()->pixelSize() / o->outputDevice()->scale()); } } m_size = r.size();