Fix sending window to all desktops

NET::OnAllDesktops is a special desktop number (-1), desktopForX11Id will not return a desktop for it

When all desktops are requested pass an empty desktop list, the following code will handle it appropriately

BUG: 482670
This commit is contained in:
Nicolas Fella 2024-03-07 23:28:25 +01:00 committed by Vlad Zahorodnii
parent 2103eb8d16
commit 7078f4e3af

View file

@ -260,7 +260,9 @@ WinInfo::WinInfo(X11Window *c, xcb_window_t window,
void WinInfo::changeDesktop(int desktopId) void WinInfo::changeDesktop(int desktopId)
{ {
if (VirtualDesktop *desktop = VirtualDesktopManager::self()->desktopForX11Id(desktopId)) { if (desktopId == NET::OnAllDesktops) {
Workspace::self()->sendWindowToDesktops(m_client, {}, true);
} else if (VirtualDesktop *desktop = VirtualDesktopManager::self()->desktopForX11Id(desktopId)) {
Workspace::self()->sendWindowToDesktops(m_client, {desktop}, true); Workspace::self()->sendWindowToDesktops(m_client, {desktop}, true);
} }
} }