From f343f3fb80284a8e402b39924c789b629806ac62 Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Tue, 27 Sep 2022 13:57:10 +0300 Subject: [PATCH] wayland: Use true logical geometry in Display::outputsIntersecting() Display::outputsIntersecting() computes the logical geometry using the oriented mode size and the scale factor, but OutputInterface's scale factor is ceil()ed up, so the resulting logical geometry can be incorrect. BUG: 459733 --- src/wayland/display.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/wayland/display.cpp b/src/wayland/display.cpp index d3f4009a5b..11c847561f 100644 --- a/src/wayland/display.cpp +++ b/src/wayland/display.cpp @@ -166,8 +166,7 @@ QVector Display::outputsIntersecting(const QRect &rect) const { QVector outputs; for (auto *output : qAsConst(d->outputs)) { - const QRect outputGeometry(output->globalPosition(), output->pixelSize() / output->scale()); - if (rect.intersects(outputGeometry)) { + if (output->handle()->geometry().intersects(rect)) { outputs << output; } }