Repository navigation
native2: background paste preparation and file-dialog path entry (#143) - #167
Merged
Merged
Conversation
Pastes into an inactive app first make its window key with a SkyLight activation record and a routed title-bar click, as Peekaboo does; desktop_dialog_answer path enters a folder and name in an Open or Save panel. Why: native2/Sources/DesktopMac/BackgroundPreparation.swift | TextEdit and Finder drop a background Command-V unless the window is key; #99 passed earlier only because TextEdit happened to be frontmost Why: native2/Sources/DesktopMac/Dialogs.swift | a sheet (and Go to Folder inside it) holds keyboard focus itself, so the focused window can be a sheet inside the dialog's window
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.
Closes two native2 tool gaps from native2/CUTOVER.md.
Background paste preparation. native2's background Command-V landed only when the target app was already active. #99 passed earlier only because TextEdit happened to be frontmost, and the #114 Finder paste ended unknown with the clipboard replaced. A paste into an inactive app now prepares the exact window the way Peekaboo does:
SLPSPostEventRecordToactivation record;A window whose title row has no blank chrome (Finder's toolbar) is refused before any input, with a
desktop_focushint and the clipboard restored. The shipped stack refuses an inactive Finder too. live-check #114 now focuses Finder first, which Node's foregrounddesktop_opendid implicitly.desktop_dialog_answer
path. Ported from Peekaboo's DialogService+FileDialogPath:PathTextField, or use Go to Folder (Command-Shift-G, set or type the path, Return);The panel's focus check accepts a sheet, or Go to Folder's sheet within it, holding focus.
Live (standalone native2 host and MCP,
--server):Tests: native2 RuntimeTests (+ DialogPathTests) and CoreTests pass.