-
-
Notifications
You must be signed in to change notification settings - Fork 344
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Force FL window foreground when switching keyboard layout #3375
base: dev
Are you sure you want to change the base?
Conversation
@check-spelling-bot Report🔴 Please reviewSee the 📂 files view, the 📜action log, or 📝 job summary for details.
See ❌ Event descriptions for more information. If the flagged items are 🤯 false positivesIf items relate to a ...
|
🥷 Code experts: no user but you matched threshold 10 Jack251970 has most 👩💻 activity in the files. See details
Activity based on git-commit:
Knowledge based on git-blame: To learn more about /:\ gitStream - Visit our Docs |
Be a legend 🏆 by adding a before and after screenshot of the changes you made, especially if they are around UI/UX. |
📝 WalkthroughWalkthroughThe changes update the Changes
Sequence Diagram(s)sequenceDiagram
participant App as Application
participant Helper as Win32Helper
participant PInvoke as PInvoke
App->>Helper: Call SwitchToEnglishKeyboardLayout()
Helper->>Helper: Retrieve main window handle via GetWindowHandle()
Helper->>Helper: Check if handle is the foreground window (IsForegroundWindow)
alt Window is not foreground
Helper->>PInvoke: Invoke SetForegroundWindow(hwnd)
PInvoke-->>Helper: Return status
alt Operation fails
Helper-->>App: Throw Win32Exception
else Operation succeeds
Helper-->>App: Continue execution
end
else Window is already foreground
Helper-->>App: Continue execution
end
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🧰 Additional context used🧬 Code Definitions (1)Flow.Launcher.Infrastructure/Win32Helper.cs (2)
⏰ Context from checks skipped due to timeout of 90000ms (3)
🔇 Additional comments (5)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Follow on with #3366.
When switching keyboard layout, we need to make sure foreground window is FL main window.