Repository navigation
Show no focused pane in an unfocused window - #459
Merged
amirlehmam merged 1 commit intoNov 15, 2026
Merged
Conversation
The focus ring, the active-tab accent and the missing dim stayed on the focused pane when the wmux window lost OS focus, so with two windows side by side both appeared to own the keyboard. Main now reports BrowserWindow focus and blur to the renderer, which toggles a class on <html>; while it is set the focused pane loses its ring and accent and dims like the others. Main is the source because the renderer's own blur also fires when focus moves into a browser pane's webview. The focused pane itself does not change.
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.
Problem
A wmux window without OS focus still shows its focused pane: the accent ring, the accent on its active tab, and no dim.
With two wmux windows side by side, both look like they have the keyboard, so it is hard to tell which one your typing goes to.
Change
BrowserWindowfocus/blurto the renderer (WINDOW_FOCUS_CHANGED, seeded byWINDOW_IS_FOCUSED). The renderer's ownbluris not used because it would probably also fire when focus moves into a browser pane's<webview>, which is still the same window.App.tsxtoggleswmux-window-inactiveon<html>. While it is set, the focused pane loses its ring and active-tab accent (transparent mode included) and dims like the other panes. In focus mode that means the whole window gets the focus-mode dim.PaneWrapper.tsxtosplitpane.css, so the window class can override it. Which pane is focused does not change.Testing
npm test: 414 files passed, 2 skipped; 6701 tests passed, 10 skipped.npm run typecheckis clean.