diff --git a/plugins/platforms/drm/drm_output.cpp b/plugins/platforms/drm/drm_output.cpp --- a/plugins/platforms/drm/drm_output.cpp +++ b/plugins/platforms/drm/drm_output.cpp @@ -53,6 +53,7 @@ #include #include +#include namespace KWin { @@ -804,10 +805,16 @@ { m_scale = scale; if (m_waylandOutput) { - m_waylandOutput->setScale(scale); + // this is the scale that clients will ideally use for their buffers + // this has to be an int which is fine + + // I don't know whether we want to round or ceil + // or maybe even set this to 3 when we're scaling to 1.5 + // don't treat this like it's chosen deliberately + m_waylandOutput->setScale(std::ceil(scale)); } if (m_waylandOutputDevice) { - m_waylandOutputDevice->setScale(scale); + m_waylandOutputDevice->setScaleF(scale); } if (m_xdgOutput) { m_xdgOutput->setLogicalSize(pixelSize() / m_scale); @@ -848,7 +855,7 @@ } if (m_changeset->scaleChanged()) { qCDebug(KWIN_DRM) << "Setting scale:" << m_changeset->scale(); - setScale(m_changeset->scale()); + setScale(m_changeset->scaleF()); } return true; }