Swapping desktops: only swap windows on current activity.

In the desktop grid effect, dragging an empty area of a desktop to
another desktop swaps all windows on the two desktops. This change makes
sure that this matches only windows in the current activity.

Was earlier fixed in
1e0b0c881e
, but the bug was reintroduced by the QML rewrite.

BUG: 386769
This commit is contained in:
Kishore Gopalakrishnan 2022-07-10 11:02:59 +05:30 committed by Vlad Zahorodnii
parent b167f67362
commit ed128064e3

View file

@ -199,7 +199,7 @@ void DesktopGridEffect::swapDesktops(int from, int to)
QList<EffectWindow *> fromList;
QList<EffectWindow *> toList;
for (auto *w : effects->stackingOrder()) {
if (!w->isNormalWindow()) {
if (!w->isNormalWindow() || !w->isOnCurrentActivity() ) {
continue;
}
if (w->isOnDesktop(from)) {