Close app drawer when a new window is created

In convergence mode the app drawer stays open after launching an
application. Connect to WindowUtil.onWindowCreated and close the
drawer automatically so the user lands on the new window.
This commit is contained in:
Marco Allegretti 2026-04-09 10:14:33 +02:00
parent 769211cf75
commit 908a63ba44

View file

@ -64,6 +64,16 @@ ContainmentItem {
screenGeometry: Plasmoid.containment.screenGeometry
}
// Close app drawer when a new window appears
Connections {
target: WindowPlugin.WindowUtil
function onWindowCreated() {
if (folio.HomeScreenState.viewState === Folio.HomeScreenState.AppDrawerView) {
folio.HomeScreenState.closeAppDrawer();
}
}
}
function homeAction() {
const isInWindow = (!WindowPlugin.WindowUtil.isShowingDesktop && windowMaximizedTracker.showingWindow);