fix: don't show the focus border of a window from another workspace - #575
Open
mattchristenson wants to merge 1 commit into
Open
mattchristenson wants to merge 1 commit into
mattchristenson wants to merge 1 commit into
Conversation
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 (forge-ext#268). Only draw borders for a focused window that is on the active workspace. Fixes forge-ext#268 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #268.
Problem. With tiling turned off, switching to another workspace left the focused window's border on screen, over the new workspace, as reported in #268 and reproduced by the maintainer. Forge draws borders as separate actors in
global.window_group, not as part of the window.showWindowBorders()draws one for the focused window. Right after a switch, focus can still be on the window of the previous workspace. With tiling on, the render that follows the switch hides it again; with tiling off nothing does.Change.
showWindowBorders()only draws borders for a focused window that is on the active workspace (located_on_workspace(), which also counts windows shown on all workspaces).Testing. Scenario
scenarios/23_border_on_workspace_switch.py:mainthe border is still showing (fails); with this PR it is gone.main3/4 → 4/4. The rest of the suite is unchanged.prettier@2.7.1 --checkis clean.🤖 Generated with Claude Code