Individual skill
setting-up-macos-window
Setting up the macOS window layer when porting a Windows game to Metal. Covers AppDelegate + NSWindow programmatic setup, a CAMetalLayer-backed GameView with CAMetalDisplayLink, GameViewController lifecycle, AppKit notifications routed into the engine via `Engine*` callbacks, keyboard/mouse input replacing WndProc, fullscreen transitions, cursor visibility and mouse-look confinement, sleep prevention, and per-frame screen state for sizes and EDR. Use whenever the question touches porting a Windows game window to macOS — AppDelegate / GameView / GameViewController setup, replacing WndProc, fullscreen, cursor handling, window resize, or AppKit notification routing.
game-porting-skills/skills/setting-up-macos-window/SKILL.md
Source commit 4f42344c90be22112f46becc3fb9687f423f2f88
What was checked
- Matches the observed repository HEAD
- Yes
- Scanner rules are current
- Yes
- Repository scan complete
- No
- Skill scan complete
- Yes
- Observed behavior
- Instructions only
- Last checked
- Nov 5, 2026
These are observations at the recorded commit, not a guarantee of safety. Review the source before running it.
Install this skill
Choose an agent in your Stack or copy a command below. Commands fetch the pinned commit and copy only this skill directory. Existing destinations are refused. Copying a command does not install anything.
An install command is unavailable: current rules, complete repository and skill scans, an eligible behavior level and a permitted license are required.
Repository context
- Repository stars (not skill ratings)
- 220
- Repository last updated
- Jun 8, 2026
- License
- Apache-2.0
Observed agent integration: No specific integration evidence. Standard SKILL.md installation does not imply verified compatibility.
- engineering Derived category
Files and excerpt
File metadata and permitted, redacted excerpts come from the recorded scan. Source links are pinned to that commit.
Browse files
SKILL.mdcore · 12,609 bytesreferences/engine-and-messages.mddoc · 10,167 bytesreferences/keyboard-events.mddoc · 2,023 bytesreferences/mouse-and-cursor.mddoc · 8,329 bytesreferences/presentation-and-sleep.mddoc · 2,760 bytesreferences/window-implementation.mddoc · 4,783 bytesreferences/window-notifications.mddoc · 6,750 bytes
Read excerpt
# Game Window Port
A guided workflow for wiring up the macOS window layer when porting a Windows game to Metal.
## Scope and Companion Skills
This skill covers windowing concerns: the AppKit surface, the view that owns the `CAMetalLayer` and the render-tick source, lifecycle, notifications, and input.
The boundary with the engine is the `Engine*` callback API described in Phase 6.
Past that boundary, presentation and rendering live in companion skills:
| Question is about | Skill |
|---|---|
| Drawable acquisition, presentation flow (`waitForDrawable`, `signalDrawable`, `present`), layer property semantics (`pixelFormat`, `colorspace`, `drawableSize`, `maximumDrawableCount`, `displaySyncEnabled`, EDR opt-in), Metal 3 vs Metal 4 | `presenting-metal-drawables` |
| D3D12/Vulkan API mapping to Metal 4 (device, queue, command buffer, encoder, PSO, shader compile, swap chain) | `translating-to-metal4-api` |