Simplify Window::setDesktop()

workspace()->updateOnAllDesktopsOfTransients() is not needed because we
call setDesktops() for transients immediately after it.
This commit is contained in:
Vlad Zahorodnii 2023-02-24 17:08:55 +02:00
parent 18870f67cc
commit 6e705f6034

View file

@ -1047,7 +1047,6 @@ void Window::setDesktops(QVector<VirtualDesktop *> desktops)
return;
}
const bool wasOnAllDesktops = isOnAllDesktops();
m_desktops = desktops;
if (windowManagementInterface()) {
@ -1069,10 +1068,6 @@ void Window::setDesktops(QVector<VirtualDesktop *> desktops)
}
}
if (isOnAllDesktops() != wasOnAllDesktops) {
workspace()->updateOnAllDesktopsOfTransients(this);
}
auto transients_stacking_order = workspace()->ensureStackingOrder(transients());
for (auto it = transients_stacking_order.constBegin(); it != transients_stacking_order.constEnd(); ++it) {
(*it)->setDesktops(desktops);