Simplify Window::setDesktop()

workspace()->updateOnAllDesktopsOfTransients() is not needed because we
call setDesktops() for transients immediately after it.
master
Vlad Zahorodnii 2 years ago
parent 18870f67cc
commit 6e705f6034

@ -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);

Loading…
Cancel
Save