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; return;
} }
const bool wasOnAllDesktops = isOnAllDesktops();
m_desktops = desktops; m_desktops = desktops;
if (windowManagementInterface()) { 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()); auto transients_stacking_order = workspace()->ensureStackingOrder(transients());
for (auto it = transients_stacking_order.constBegin(); it != transients_stacking_order.constEnd(); ++it) { for (auto it = transients_stacking_order.constBegin(); it != transients_stacking_order.constEnd(); ++it) {
(*it)->setDesktops(desktops); (*it)->setDesktops(desktops);

Loading…
Cancel
Save