Small change to ActiveWindow
This commit is contained in:
parent
374d3681ce
commit
e04c4e1394
2 changed files with 8 additions and 13 deletions
|
|
@ -27,7 +27,7 @@ Row {
|
|||
}
|
||||
}
|
||||
|
||||
// Update text when window changes or title changes
|
||||
// Update text when window changes
|
||||
Connections {
|
||||
target: CompositorService
|
||||
function onActiveWindowChanged() {
|
||||
|
|
@ -38,15 +38,6 @@ 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() {
|
||||
|
|
|
|||
|
|
@ -311,14 +311,18 @@ Singleton {
|
|||
|
||||
// Update focused window index if this window is focused
|
||||
if (newWindow.isFocused) {
|
||||
const oldFocusedIndex = focusedWindowIndex
|
||||
focusedWindowIndex = windows.findIndex(w => w.id === windowData.id)
|
||||
updateFocusedWindowTitle()
|
||||
activeWindowChanged()
|
||||
|
||||
// Only emit activeWindowChanged if the focused window actually changed
|
||||
if (oldFocusedIndex !== focusedWindowIndex) {
|
||||
activeWindowChanged()
|
||||
}
|
||||
} else if (existingIndex >= 0 && existingIndex === focusedWindowIndex) {
|
||||
// If this is the currently focused window (but not newly focused),
|
||||
// still update the title in case it changed
|
||||
// still update the title in case it changed, but don't emit activeWindowChanged
|
||||
updateFocusedWindowTitle()
|
||||
activeWindowChanged()
|
||||
}
|
||||
|
||||
windowListChanged()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue