fix: settings open makes window focus and in-front#245
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0f9095a33f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| @MainActor | ||
| func appActivate() { | ||
| NSApp.activate() | ||
| NSApp.activate(ignoringOtherApps: true) |
There was a problem hiding this comment.
Keep appActivate from stealing focus in background callbacks
Switching appActivate() to NSApp.activate(ignoringOtherApps: true) changes behavior for every caller, not only the Settings button. UpdaterService.updater(_:didFindValidUpdate:) invokes appActivate() when automatic update checks find a release, so this commit now forces the app to the foreground even if the user is actively working in another application. That makes background update discovery interruptive and is a regression in user experience outside the Settings flow.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Honestly I'm a fan of this, I think that if we're opening a window it makes genuine sense being the only way to access this is from the menubar.
Thoughts?
|
Oops #224 already grabbed this |
This pull-request makes it so that when you press the
Settingsbutton to open the settings menu, it will show in the apps icon in the dock and also become the top most focused window.preview-coder-settings-focus-open.mp4