From a057697becfdbc036ba13c7a5cf8f85f19c1eb0e Mon Sep 17 00:00:00 2001 From: mattchristenson Date: Tue, 29 Sep 2026 20:57:21 -0500 Subject: [PATCH] fix: don't show the focus border of a window from another workspace Right after a workspace switch, focus can still be on a window of the previous workspace, and with tiling off nothing redraws the borders after it moves on: the border stayed on screen over the new workspace (#268). Only draw borders for a focused window that is on the active workspace. Fixes #268 Co-Authored-By: Claude Opus 5.5 --- lib/extension/window.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/extension/window.js b/lib/extension/window.js index 61820e1e..4f28047e 100644 --- a/lib/extension/window.js +++ b/lib/extension/window.js @@ -1241,6 +1241,9 @@ export class WindowManager extends GObject.Object { showWindowBorders() { let metaWindow = this.focusMetaWindow; if (!metaWindow) return; + // Right after a workspace switch, focus can still be on a window of the previous workspace: + // its border would stay on screen over the new one (#268) + if (!metaWindow.located_on_workspace(global.workspace_manager.get_active_workspace())) return; let windowActor = metaWindow.get_compositor_private(); if (!windowActor) return; let nodeWindow = this.findNodeWindow(metaWindow);