Set macOS dock icon when applying ImGuiApp window icon - #403
Conversation
Co-authored-by: matt-edmondson <19528727+matt-edmondson@users.noreply.github.com>
ImGuiApp window icon
|
@copilot do the other platforms need something similar, for the taskbar and whatever? |
Not usually. On Windows/Linux, |
|
@copilot pkease address the sonar gate |
Co-authored-by: matt-edmondson <19528727+matt-edmondson@users.noreply.github.com>
|
@copilot please address the code quality comments |
Co-authored-by: matt-edmondson <19528727+matt-edmondson@users.noreply.github.com>
|



IconPath/SetWindowIconupdated the GLFW window icon but did not reliably affect the macOS app icon shown in the Dock. This change adds a macOS-specific app-icon path while keeping existing cross-platform window-icon behavior intact.macOS app icon path
TrySetMacOSApplicationIcon(string iconPath)inImGui.Appto call AppKit via Objective-C runtime (NSApplication.sharedApplication.setApplicationIconImage:).SetWindowIconbefore calling Silk/GLFWSetWindowIcon, so macOS receives both app-level and window-level icon updates.Native interop surface
NativeMethods:objc_getClasssel_registerNameobjc_msgSendoverloads used by icon setupAPI/docs alignment
SetWindowIconandImGuiAppConfig.IconPathto state macOS dock icon behavior explicitly.