[codex] Bring Auto-Type selection to foreground#147
Draft
SirAndrosBot wants to merge 1 commit into
Draft
Conversation
|
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.



What changed
AutoTypeCtxFormwindows when KeePass creates them throughGlobalWindowManager.WindowAdded.TopMost, callBringToFront()andActivate(), then restore the previousTopMostvalue in afinallyblock.Why
Issue #48 reports that, after Windows Hello unlock during global Auto-Type, the KeePass Auto-Type selection window can appear behind the current target application. That leaves the user in an awkward state because KeePass has unlocked but the selection UI is not visible/focused.
This PR implements the narrow part that is safe from inside this plugin: when KeePass creates the Auto-Type selection form, bring that KeePass-owned form to the foreground.
Scope deliberately not changed
This does not change Windows Hello/CNG prompt parent selection and does not change database relock behavior after Auto-Type. A broader worker attempt was rejected during review because it depended on brittle KeePass stack-frame detection, could leave stale relock state that later locks all databases after an unrelated Auto-Type send, and did not actually reach the nested CNG prompt context used by
KeyManager.ExtractCompositeKey.Those parts need a deeper design and manual validation on a real multi-monitor, non-RDP Windows setup. This PR is therefore partial and uses
Refs #48, notFixes #48.Refs #48
Validation
git diff --checkpassed with only Git LF-to-CRLF working-copy warnings.MSBuild.exe src\KeePassWinHello.csproj /t:Rebuild /p:Configuration=Release /p:DefineConstants=MONO /p:FrameworkPathOverride=C:\Windows\Microsoft.NET\Framework\v4.0.30319 /p:ReferencePath=C:\proj\KeePassWinHello\libpassed with 0 warnings and 0 errors.Manual test needed