From 0765a08cc8b5fda6a2c7514d99d8c7f8e0287050 Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Sat, 4 Dec 2021 17:57:04 +0200 Subject: [PATCH] effects/overview: Remove premature optimization in ExpoLayout::calculateWindowTransformationsNatural() The natural geometry can live in a different coordinate space than the target area. Remove the premature optimization so the cell is properly placed if the two are in different coordinate spaces. --- src/effects/overview/expolayout.cpp | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/effects/overview/expolayout.cpp b/src/effects/overview/expolayout.cpp index 66f3cb4ab7..7f6aca852d 100644 --- a/src/effects/overview/expolayout.cpp +++ b/src/effects/overview/expolayout.cpp @@ -452,17 +452,6 @@ static bool isOverlappingAny(ExpoCell *w, const QHash &target void ExpoLayout::calculateWindowTransformationsNatural() { const QRect area = QRect(0, 0, width(), height()); - if (m_cells.count() == 1) { - // Just move the window to its original location to save time - ExpoCell *cell = m_cells.constFirst(); - if (area.contains(cell->naturalRect().marginsAdded(cell->margins()))) { - cell->setX(cell->naturalX()); - cell->setY(cell->naturalY()); - cell->setWidth(cell->naturalWidth()); - cell->setHeight(cell->naturalHeight()); - return; - } - } // As we are using pseudo-random movement (See "slot") we need to make sure the list // is always sorted the same way no matter which window is currently active.