Fix ActiveWindow Title change (#128)
This commit is contained in:
parent
ca7e0cc105
commit
374d3681ce
2 changed files with 28 additions and 3 deletions
|
|
@ -27,7 +27,7 @@ Row {
|
|||
}
|
||||
}
|
||||
|
||||
// Update text when window changes
|
||||
// Update text when window changes or title changes
|
||||
Connections {
|
||||
target: CompositorService
|
||||
function onActiveWindowChanged() {
|
||||
|
|
@ -38,11 +38,22 @@ Row {
|
|||
fullTitleTimer.restart()
|
||||
}
|
||||
}
|
||||
|
||||
function onWindowTitleChanged() {
|
||||
// Direct response to title changes
|
||||
if (CompositorService.focusedWindowIndex === lastWindowIndex) {
|
||||
// Same window, title changed - show full title briefly
|
||||
showingFullTitle = true
|
||||
fullTitleTimer.restart()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function getTitle() {
|
||||
const focusedWindow = CompositorService.getFocusedWindow()
|
||||
return focusedWindow ? (focusedWindow.title || focusedWindow.appId || "") : ""
|
||||
// Use the service's focusedWindowTitle property which is updated immediately
|
||||
// when WindowOpenedOrChanged events are received
|
||||
return CompositorService.focusedWindowTitle !== "(No active window)" ?
|
||||
CompositorService.focusedWindowTitle : ""
|
||||
}
|
||||
|
||||
function getAppIcon() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue