WIP: Fixed initial desktops

This commit is contained in:
Yuki Joou 2024-09-12 00:30:08 +02:00
parent afce075057
commit ebf8bb3535
2 changed files with 3 additions and 3 deletions

View file

@ -744,7 +744,7 @@ bool X11Window::manage(xcb_window_t w, bool isMapped)
if (on_all) {
initialDesktops = QList<VirtualDesktop *>{};
} else if (on_current) {
initialDesktops = QList<VirtualDesktop *>{VirtualDesktopManager::self()->currentDesktop()};
initialDesktops = QList<VirtualDesktop *>{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<VirtualDesktop *>{};
} else {
initialDesktops = QList<VirtualDesktop *>{VirtualDesktopManager::self()->currentDesktop()};
initialDesktops = QList<VirtualDesktop *>{VirtualDesktopManager::self()->currentDesktop(workspace()->activeOutput())};
}
}
setDesktops(rules()->checkDesktops(*initialDesktops, !isMapped));

View file

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