diff --git a/backends/kwayland/waylandconfig.cpp b/backends/kwayland/waylandconfig.cpp --- a/backends/kwayland/waylandconfig.cpp +++ b/backends/kwayland/waylandconfig.cpp @@ -316,7 +316,7 @@ wlOutputConfiguration->setPosition(o_old->outputDevice(), output->pos()); } - if (device->scale() != output->scale()) { + if (!qFuzzyCompare(device->scale(), output->scale())) { changed = true; wlOutputConfiguration->setScale(o_old->outputDevice(), output->scale()); } diff --git a/src/mode.cpp b/src/mode.cpp --- a/src/mode.cpp +++ b/src/mode.cpp @@ -120,7 +120,7 @@ void Mode::setRefreshRate(float refresh) { - if (d->rate == refresh) { + if (qFuzzyCompare(d->rate, refresh)) { return; } diff --git a/src/output.cpp b/src/output.cpp --- a/src/output.cpp +++ b/src/output.cpp @@ -108,7 +108,7 @@ if (mb->size() != ma->size()) { return false; } - if (mb->refreshRate() != ma->refreshRate()) { + if (!qFuzzyCompare(mb->refreshRate(), ma->refreshRate())) { return false; } if (mb->name() != ma->name()) { @@ -387,7 +387,7 @@ void Output::setScale(qreal factor) { - if (d->scale == factor) { + if (qFuzzyCompare(d->scale, factor)) { return; } d->scale = factor; @@ -527,7 +527,7 @@ changes << &Output::rotationChanged; setRotation(other->d->rotation); } - if (d->scale != other->d->scale) { + if (!qFuzzyCompare(d->scale, other->d->scale)) { changes << &Output::scaleChanged; setScale(other->d->scale); }