fix: Unify pollHttp behavior across platforms#172
Merged
treeform merged 5 commits intotreeform:masterfrom Apr 6, 2026
Merged
Conversation
Unconditional usage of the flag for mac causes unexpected behavior on every other platform for codebases developed primarily on mac. It causes normally behaving mac apps to not download anything at all on linux. Windows silently works "as expected" only because the event update function on windy is a no-op anyway.
windyUseStdHttp for all platformspollHttp behavior across platforms
treeform
approved these changes
Apr 3, 2026
nishu-builder
pushed a commit
to Metta-AI/mettagrid
that referenced
this pull request
Apr 9, 2026
## Summary - Updates the windy nimby lock hash from `d87b6ad` to `45f58a2` (latest master) ## What changed in windy The new windy includes [treeform/windy#174](treeform/windy#174) which fixes an intermittent bug where the mettascope window would not come to the front on macOS startup. **Root cause:** `setActivationPolicy(NSApplicationActivationPolicyRegular)` was called inside the `applicationDidFinishLaunching` callback and then immediately tried to activate the app. This policy change tells the macOS window server (a separate process) to promote the app from a background process to a regular GUI app, but the window server processes this asynchronously via IPC. Sometimes the promotion completed before the activation request arrived (window comes to front), sometimes it didn't (window stays behind other apps). **Fix:** Moved `setActivationPolicy` to before `finishLaunching()` in `init()`, giving the window server more time to process the policy change before any window is created or activation is attempted. This is the same approach used by GLFW and SDL. Also includes: - [treeform/windy#172](treeform/windy#172): Unify `pollHttp` behavior across platforms - [treeform/windy#173](treeform/windy#173): Fix readme spelling and grammar ## Test plan - [x] Launch mettascope repeatedly on macOS and verify the window consistently comes to front 🤖 Generated with [Claude Code](https://claude.com/claude-code)
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.
Unconditional usage of
pollHttp()for mac+emscripten, without protection from-d:windyUseStdHttp, causes unexpected behavior on every other platform for codebases developed primarily on mac.It causes normally behaving mac apps to not download anything at all on linux.
Windows silently works "as expected" only because the event update function on windy is a no-op anyway.
This PR unifies
pollHttp()behavior across platforms by not requiring the user to set a flag that only has significance for Linux systems, and silently does nothing on Windows systems.