diff --git a/src/main.cpp b/src/main.cpp index 42ff3958b4..65c71b9ea5 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -381,6 +381,7 @@ static X11EventFilterContainer *takeEventFilter(X11EventFilter *eventFilter, void Application::setXwaylandScale(qreal scale) { + Q_ASSERT(scale != 0); if (scale != m_xwaylandScale) { m_xwaylandScale = scale; // change the font dpi to match diff --git a/src/wayland/clientconnection.cpp b/src/wayland/clientconnection.cpp index dcd839f4a8..98e6382f0b 100644 --- a/src/wayland/clientconnection.cpp +++ b/src/wayland/clientconnection.cpp @@ -155,6 +155,7 @@ QString ClientConnection::executablePath() const void ClientConnection::setScaleOverride(qreal scaleOveride) { + Q_ASSERT(scaleOveride != 0); d->scaleOverride = scaleOveride; Q_EMIT scaleOverrideChanged(); } diff --git a/src/workspace.cpp b/src/workspace.cpp index ae7e8208db..e1ed446dfa 100644 --- a/src/workspace.cpp +++ b/src/workspace.cpp @@ -477,7 +477,7 @@ bool Workspace::applyOutputConfiguration(const OutputConfiguration &config, cons KConfig cfg(QStringLiteral("kdeglobals")); KConfigGroup kscreenGroup = cfg.group("KScreen"); const bool xwaylandClientsScale = kscreenGroup.readEntry("XwaylandClientsScale", true); - if (xwaylandClientsScale) { + if (xwaylandClientsScale && !outputOrder.isEmpty()) { double maxScale = 0; for (Output *output : outputOrder) { const auto changeset = config.constChangeSet(output);