diff --git a/src/x11window.cpp b/src/x11window.cpp index cd2b38531f..32c722a429 100644 --- a/src/x11window.cpp +++ b/src/x11window.cpp @@ -744,7 +744,7 @@ bool X11Window::manage(xcb_window_t w, bool isMapped) if (on_all) { initialDesktops = QList{}; } else if (on_current) { - initialDesktops = QList{VirtualDesktopManager::self()->currentDesktop()}; + initialDesktops = QList{VirtualDesktopManager::self()->currentDesktop(workspace()->activeOutput())}; } else if (maincl) { initialDesktops = maincl->desktops(); } @@ -791,7 +791,7 @@ bool X11Window::manage(xcb_window_t w, bool isMapped) if (isDesktop()) { initialDesktops = QList{}; } else { - initialDesktops = QList{VirtualDesktopManager::self()->currentDesktop()}; + initialDesktops = QList{VirtualDesktopManager::self()->currentDesktop(workspace()->activeOutput())}; } } setDesktops(rules()->checkDesktops(*initialDesktops, !isMapped)); diff --git a/src/xdgshellwindow.cpp b/src/xdgshellwindow.cpp index 1b2ec98ca6..ab5b5eec4a 100644 --- a/src/xdgshellwindow.cpp +++ b/src/xdgshellwindow.cpp @@ -419,7 +419,7 @@ XdgToplevelWindow::XdgToplevelWindow(XdgToplevelInterface *shellSurface) { setOutput(workspace()->activeOutput()); setMoveResizeOutput(workspace()->activeOutput()); - setDesktops({VirtualDesktopManager::self()->currentDesktop()}); + setDesktops({VirtualDesktopManager::self()->currentDesktop(workspace()->activeOutput())}); #if KWIN_BUILD_ACTIVITIES if (auto a = Workspace::self()->activities()) { setOnActivities({a->current()});