Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Set dock icon on MacOS#2805

Closed
annes12345678910 wants to merge 4 commits intoglfw:masterfrom
annes12345678910:main
Closed

Set dock icon on MacOS#2805
annes12345678910 wants to merge 4 commits intoglfw:masterfrom
annes12345678910:main

Conversation

@annes12345678910
Copy link

Currently on MacOS, GLFW throws the error "Regular windows do not have icons on macOS", and I use raylib so I wanted to fix that. Now GLFW sets the dock icon instead of throwing an error.

Here's an example with raylib, compiled with my changes:
Screenshot 2025-12-25 at 8 13 08 PM

Summary of commits

  • Added nullptr alias
  • included more libraries: Cocoa and the objc runtime
  • Added private function __CocoaSetDockIcon
  • Changed the function _glfwSetWindowIconCocoa

skibidi

@ws909
Copy link

ws909 commented Dec 26, 2025

@dougbinks dougbinks added macOS enhancement Feature suggestions and PRs labels Dec 29, 2025
@annes12345678910
Copy link
Author

shii

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Feature suggestions and PRs macOS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants