NY4QPM4HJRIPYWMI7P2TZ2HDSWSX3T6SGNRQC44AWI2YXMDM3CUAC
let sibling_windows: Window[] = [];
if (t.parent?.tiles?.length == 2) {
// if this tile has only one sibling, we need to move that sibling's windows into the parent
// when this tile gets destroyed
// kwin kind of tries to do this but fails - it resizes the windows properly but the windows are
// left untiled somehow
const sibling_index = 1 - get_tile_index(t);
const sibling_tile = t.parent!.tiles[sibling_index];
if (sibling_tile.tiles.length == 0) {
// it contains only windows and no tiles
// hopefully kwin takes the wheel in the other case
for (const w of sibling_tile.windows) {
sibling_windows.push(w);
}
}
}
const p = t.parent;