fix: when new items enter the tabbed view they should be the active window

This commit is contained in:
Lucas Oskorep
2026-03-02 11:26:28 -05:00
parent e33b057c10
commit cfd295a766
3 changed files with 25 additions and 0 deletions

View File

@@ -161,6 +161,21 @@ export default class WindowContainer {
return this._activeTabIndex;
}
/**
* If the given window is a tab in this container, make it the active tab.
* Returns true if the window was found and activated.
*/
focusWindowTab(windowId: number): boolean {
if (!this.isTabbed()) return false;
const index = this._getIndexOfWindow(windowId);
if (index !== -1 && index !== this._activeTabIndex) {
this.setActiveTab(index);
return true;
}
return index !== -1;
}
hideTabBar(): void {
this._tabBar?.hide();
}