xwayland: Do not set scale to 0

It would be the case upon lid close which would make KWin crash. Also
adds an assert so in case it happened again we would be able to catch it
easily. It gets applied asynchronously so it needs to be chased down.
master
Aleix Pol Gonzalez 11 months ago committed by Vlad Zahorodnii
parent 2a14a4e398
commit c899cd07f8

@ -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

@ -155,6 +155,7 @@ QString ClientConnection::executablePath() const
void ClientConnection::setScaleOverride(qreal scaleOveride)
{
Q_ASSERT(scaleOveride != 0);
d->scaleOverride = scaleOveride;
Q_EMIT scaleOverrideChanged();
}

@ -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);

Loading…
Cancel
Save