Repository navigation
Conversation
Contributor
Author
|
The Android check failed before it checked out the code: Docker Hub refused to pull the |
A macOS app always came to the front: `run` set the regular activation policy, which gives the app a Dock icon and the menu bar, ordered its window front and made it key, and `application_did_update` activated the app on its first update, ignoring other apps. An app that only renders off-screen, or that a tool launches only to screenshot its window, took the user's focus each time it ran. `Platform::macos_launch_in_background` keeps it out of the way: the app gets the accessory activation policy, so no Dock icon and no menu bar, it skips the first-update activation, and its window goes to the back without becoming key. The window stays on screen, so it keeps drawing and can still be captured with `screencapture -l`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: multica-agent <github@multica.ai>
benface
force-pushed
the
macos-launch-in-background
branch
from
October 18, 2026 18:12
556e425 to
5ac0d2d
Compare
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.
Why
A macOS app always comes to the front.
runsets the regular activation policy, which gives the app a Dock icon and the menu bar, orders its window front and makes it key. Thenapplication_did_updateactivates the app on its first update, ignoring other apps.Confhas no option to turn any of this off.That's right for an app someone is about to use, but not for one nobody interacts with. A game that renders frames off-screen to save them, or an app a tool launches only to screenshot its window, takes the user's focus on every run, in the middle of whatever they were typing.
Change
Platform::macos_launch_in_background,falseby default. When it's set:orderBack:and doesn't become key.The window stays on screen, behind the others rather than hidden, so it keeps drawing and
screencapture -l <window id>still captures it.With the default, the code path is the same as before. Other platforms ignore the field.
Verification
On macOS 27, with
examples/quadsetting the option, on OpenGL and on Metal:lsappinforeports it as aUIElement(accessory) app, so it has no Dock icon.screencapture -lof its covered window shows the rendered quads.In a macroquad game (CHOMP) that renders its frames off-screen and saves them, the window stays covered for the whole run, and the frames are byte-identical to those from a foreground window, on both backends. A covered window keeps running at full speed: 3000 frames at a steady 120 fps, the display's refresh rate, so App Nap doesn't throttle it. Without the option, the game still comes to the front with focus.
cargo buildhas no new warnings.rustfmt --checkflags nothing in the added lines, only formatting that's already on master.🤖 Generated with Claude Code