From f6da144b114a62f626c44f05530136c5f6dbc56d Mon Sep 17 00:00:00 2001 From: annes Date: Thu, 25 Dec 2025 17:02:25 +0800 Subject: [PATCH] =?UTF-8?q?no=20more=20poopy=20=F0=9F=98=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/cocoa_window.m | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/cocoa_window.m b/src/cocoa_window.m index 7143d5b04..30374dc59 100644 --- a/src/cocoa_window.m +++ b/src/cocoa_window.m @@ -1058,14 +1058,14 @@ void __CocoaSetDockIcon(unsigned char* data, int width, int height) void _glfwSetWindowIconCocoa(_GLFWwindow* window, int count, const GLFWimage* images) { - /*_glfwInputError(GLFW_FEATURE_UNAVAILABLE, - "Cocoa: Regular windows do not have icons on macOS");*/ - if (count >= 1) { - const GLFWimage poopy = images[0]; - __CocoaSetDockIcon(poopy.pixels, poopy.width, poopy.height); - } + if (!window || count < 1) + return; + + const GLFWimage iconImage = images[0]; + __CocoaSetDockIcon(iconImage.pixels, iconImage.width, iconImage.height); } + void _glfwGetWindowPosCocoa(_GLFWwindow* window, int* xpos, int* ypos) { @autoreleasepool {