Stop stranding the Launching… OSD when a second app is launched
This commit is contained in:
@@ -150,11 +150,15 @@ Item {
|
|||||||
try { return ToplevelManager.toplevels.values.length } catch (e) { return 0 }
|
try { return ToplevelManager.toplevels.values.length } catch (e) { return 0 }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// launchOsdOpen tracks whether the OSD is on screen, not which launch put it
|
||||||
|
// there, so a new launch must not clear it: the OSD is shown with duration 0,
|
||||||
|
// and only closeLaunchFeedback() takes it down. Dropping the flag here would
|
||||||
|
// orphan an OSD left over from the previous launch, and the timer restarts
|
||||||
|
// below discard the timeout that was its last chance to close.
|
||||||
function beginLaunchFeedback(name) {
|
function beginLaunchFeedback(name) {
|
||||||
root.launchSerial++
|
root.launchSerial++
|
||||||
root.launchToplevelCount = root.toplevelCount()
|
root.launchToplevelCount = root.toplevelCount()
|
||||||
root.launchActiveToplevel = ToplevelManager.activeToplevel
|
root.launchActiveToplevel = ToplevelManager.activeToplevel
|
||||||
root.launchOsdOpen = false
|
|
||||||
root.launchOsdMessage = "Launching " + String(name || "application") + "…"
|
root.launchOsdMessage = "Launching " + String(name || "application") + "…"
|
||||||
launchDelay.restart()
|
launchDelay.restart()
|
||||||
launchTimeout.restart()
|
launchTimeout.restart()
|
||||||
|
|||||||
@@ -121,6 +121,13 @@ assert(
|
|||||||
'app library prefers indexed app icons over ambiguous themed icons'
|
'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 \}/)
|
const openMatch = menuQml.match(/function openExistingMenu\(initialMenu\) \{([\s\S]*?)\n \}/)
|
||||||
assert(openMatch, 'menu openExistingMenu function exists')
|
assert(openMatch, 'menu openExistingMenu function exists')
|
||||||
assert(
|
assert(
|
||||||
|
|||||||
Reference in New Issue
Block a user