Repository navigation
fix(overview): give a launched window the keyboard - #151
Merged
Merged
Conversation
added 2 commits
October 15, 2026 11:44
Launching an application from the overview left the search pane holding the Flutter focus, so the overview's `ActivateIntent` kept intercepting `Enter`: pressing it to validate something in the focused ephemeral window launched another instance instead of reaching the client. Typing worked only because plain letters have no handler and are forwarded. Hand the keyboard to the window when it is displayed: to its `SurfaceFocus` node once the native surface is matched, and to the launch placeholder before that. The surface shadows activation, dismissal and traversal keys with a non-consuming action, so `Enter`/`Space`/`Escape`/`Tab`/directions fall through to the client as intended.
The keyboard hand-off only ran when the window widget (re)mounted, so a pointer click or re-selecting the already-displayed window's tab left the keyboard where it was — usually the search pane, whose `ActivateIntent` then launched another instance. - Clicking the window (or its launch placeholder) requests the window focus node; the compositor already activates the client on pointer down, this keeps the Flutter focus in step. - Selecting a window's panel tab requests the same node, covering the re-click where `selectContent` changes nothing and nothing remounts.
Merged
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.
Summary
Launching an application from the overview left the search pane holding the Flutter focus, so the overview's
ActivateIntentkept interceptingEnter: pressing it to validate something in the focused ephemeral window launched another instance instead of reaching the client. Typing worked only because plain letters have no handler and were forwarded to the client.A displayed ephemeral window now owns the keyboard, and every way of getting to it hands it back:
SurfaceFocus);Enterduring the wait cannot relaunch either;selectContentchanges nothing and no widget remounts.SurfaceFocusalready shadows activation, dismissal and traversal keys (Enter,Space,Escape,Tab, directions) with an action that does not consume them, so those keys now fall through to the focused client exactly as the navigation spec describes. TheSuperchords still move the keyboard back to the search pane to keep launching.Why this shape
SurfaceFocusforwardsEnter/Space/arrows to the client, so parking focus anywhere else (the pane itself) would leave those keys consumed by Flutter.autofocus) because the surface node attaches asynchronously, after the client presents.Testing
test/ephemeral_window_focus_test.dartcovers all four paths:the waiting placeholder takes the keyboard over the search pane;
the surface node takes it once the window is matched;
clicking the window hands it the keyboard;
selecting the displayed window's tab hands it the keyboard (verified to fail without the fix).
flutter test— 488 passedflutter analyze— 0 errorsdart format --set-exit-if-changed— cleanDocs updated:
overview.md,navigation.md,ephemeral_window.md.