wayland: Fix sending org_kde_plasma_virtual_desktop.removed

If a virtual desktop is removed, the client will receive two removed
events.
This commit is contained in:
Vlad Zahorodnii 2023-04-21 15:20:11 +03:00
parent ac74de22c7
commit 35efeddb48

View file

@ -190,20 +190,14 @@ void PlasmaVirtualDesktopManagementInterface::removeDesktop(const QString &id)
return;
}
const auto desktopClientResources = (*deskIt)->d->resourceMap();
for (auto resource : desktopClientResources) {
(*deskIt)->d->send_removed(resource->handle);
}
PlasmaVirtualDesktopInterface *desktop = *deskIt;
d->desktops.erase(deskIt);
delete desktop;
const auto clientResources = d->resourceMap();
for (auto resource : clientResources) {
d->send_desktop_removed(resource->handle, id);
}
PlasmaVirtualDesktopInterface *desktop = *deskIt;
d->desktops.erase(deskIt);
delete desktop;
}
QList<PlasmaVirtualDesktopInterface *> PlasmaVirtualDesktopManagementInterface::desktops() const