diff --git a/shell/services/AppLibrary.qml b/shell/services/AppLibrary.qml index 35a3a65c..ef9456f4 100644 --- a/shell/services/AppLibrary.qml +++ b/shell/services/AppLibrary.qml @@ -26,6 +26,9 @@ Item { property int launchSerial: 0 property int launchToplevelCount: 0 property var launchActiveToplevel: null + // True while the launch OSD is on screen. It outlives the launch that opened + // it: the OSD shows with duration 0, so only closeLaunchFeedback() takes it + // down. property bool launchOsdOpen: false property string launchOsdMessage: "" @@ -154,7 +157,6 @@ Item { root.launchSerial++ root.launchToplevelCount = root.toplevelCount() root.launchActiveToplevel = ToplevelManager.activeToplevel - root.launchOsdOpen = false root.launchOsdMessage = "Launching " + String(name || "application") + "…" launchDelay.restart() launchTimeout.restart() diff --git a/test/shell.d/app-search-test.sh b/test/shell.d/app-search-test.sh index 44c13bc8..99e7678c 100644 --- a/test/shell.d/app-search-test.sh +++ b/test/shell.d/app-search-test.sh @@ -121,6 +121,13 @@ assert( 'app library prefers indexed app icons over ambiguous themed icons' ) +const beginLaunchMatch = appLibraryQml.match(/function beginLaunchFeedback\(name\) \{([\s\S]*?)\n \}/) +assert(beginLaunchMatch, 'app library beginLaunchFeedback function exists') +assert( + !beginLaunchMatch[1].includes('root.launchOsdOpen = false'), + 'app library keeps owning an OSD a previous launch left on screen' +) + const openMatch = menuQml.match(/function openExistingMenu\(initialMenu\) \{([\s\S]*?)\n \}/) assert(openMatch, 'menu openExistingMenu function exists') assert(