diff --git a/Modules/Bar/Widgets/ActiveWindow.qml b/Modules/Bar/Widgets/ActiveWindow.qml index afcd724..990f532 100644 --- a/Modules/Bar/Widgets/ActiveWindow.qml +++ b/Modules/Bar/Widgets/ActiveWindow.qml @@ -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() { diff --git a/Services/CompositorService.qml b/Services/CompositorService.qml index 595f153..aaddde4 100644 --- a/Services/CompositorService.qml +++ b/Services/CompositorService.qml @@ -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()