This commit is contained in:
Lucas Oskorep
2025-10-17 01:56:09 -04:00
parent 9f46347179
commit 8d4e51284d
2 changed files with 18 additions and 5 deletions

View File

@@ -78,9 +78,12 @@ export default class WindowContainer {
removeWindow(win_id: number): void {
if (this._tiledWindowLookup.has(win_id)) {
// Get index before deleting from lookup to avoid race condition
const index = this._getIndexOfWindow(win_id);
this._tiledWindowLookup.delete(win_id);
const index = this._getIndexOfWindow(win_id)
this._tiledItems.splice(index, 1);
if (index !== -1) {
this._tiledItems.splice(index, 1);
}
} else {
for (const item of this._tiledItems) {
if (item instanceof WindowContainer) {