Window: set window/app icon#32
Open
codymullins wants to merge 1 commit into
Open
Conversation
Add AppWindow.SetIcon(WindowIcon) and AppWindowOptions.Icon so a shell can give the window a taskbar/dock icon at creation or at runtime. - WindowIcon carries tightly-packed RGBA8 pixels. - GLFW backend builds a Silk.NET RawImage and calls SetWindowIcon. - AppKit backend builds an NSImage from a CGImage and sets the dock icon (ApplicationIconImage); macOS has no per-window icon. Closes #24
This was referenced Jun 16, 2026
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.
Closes #24.
Desktop apps set a window/app icon (taskbar, dock, window switcher). Skyline had no icon API.
What changed
WindowIcon— a record carrying tightly-packed RGBA8 pixels (Width * Height * 4bytes).AppWindow.SetIcon(WindowIcon)(runtime) andAppWindowOptions.Icon(creation) →IWindowBackend.SetIcon.RawImageand callsIWindow.SetWindowIcon.Skyline.Apple) — builds anNSImagefrom aCGImageover the pixels and setsNSApplication.ApplicationIconImage(macOS has no per-window icon; this is the dock/app icon).Tests
Skyline.WindowedTests— creates a real GLFW window withOptions.Iconand then callsSetIconat runtime, asserting neither throws (covers the creation-time apply and the runtime path).Verification
dotnet build Skyline.slnxclean (0 warnings);Skyline.Applebuilds clean on the macos workload.format-check.shclean.GlfwWindowBackendandAppWindowOptions100%; overall 98% matchesmain(the residual uncovered lines are the pre-existingAppWindow/AppHostwindowed-thread flakiness, not from this change).Note
4th open PR in the window/input seam (after #29/#30/#31). Edits are in distinct regions / appends, so merge conflicts are trivial; whichever land after the first will need a small rebase.