From 399cd808fa992c2c740436177c2da995cee5ff29 Mon Sep 17 00:00:00 2001 From: mattchristenson Date: Tue, 29 Sep 2026 20:00:04 -0500 Subject: [PATCH] fix: show the split direction hint again The hint never appeared, for two reasons: - showWindowBorders() tested `!maximized`, but maximized is a function (since d0012e0 added the test in 2023), so the condition was always false. Call it, as the focus border condition does. - Each border was inserted just above the window, so the split hint, which shares the focus border's place, ended up under it (the TODO said so). Stack each border above the one before it. Fixes #407 Co-Authored-By: Claude Opus 5.5 --- lib/extension/window.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/extension/window.js b/lib/extension/window.js index 61820e1e..2ab854c8 100644 --- a/lib/extension/window.js +++ b/lib/extension/window.js @@ -1333,7 +1333,7 @@ export class WindowManager extends GObject.Object { focusBorderEnabled && tilingModeEnabled && !nodeWindow.isFloat() && - !maximized && + !maximized() && parentNode.childNodes.length === 1 && (parentNode.isCon() || parentNode.isMonitor()) && !(parentNode.isTabbed() || parentNode.isStacked()) @@ -1358,6 +1358,9 @@ export class WindowManager extends GObject.Object { let rect = metaWindow.get_frame_rect(); + // Just above the focused window, each border above the one before it: the split hint (last) + // shares the focus border's place and would be hidden under it otherwise + let below = metaWindow.get_compositor_private(); borders.forEach((border) => { border.set_size(rect.width + inset * 2, rect.height + inset * 2); border.set_position(rect.x - inset, rect.y - inset); @@ -1365,10 +1368,9 @@ export class WindowManager extends GObject.Object { border.show(); } if (global.window_group && global.window_group.contains(border)) { - // TODO - sort the borders with split border being on top global.window_group.remove_child(border); - // Add the border just above the focused window - global.window_group.insert_child_above(border, metaWindow.get_compositor_private()); + global.window_group.insert_child_above(border, below); + below = border; } }); }