Window icon on MacOS


I am setting the window icon in my app using gtk_window_set_icon(). This is working fine on Linux and Windows, but not on MacOS - I get the icon shown below. I also note that I see no icon displayed for the gtk3-demo application. In both of these screenshots, the same icon is used in the dock.

We are targeting gtk3 and I’ve observed this on a number of different MacOS versions. I’ve observed this with both gtk+3 installed via brew and also a compiled version of gtk(/gdk).

Is anyone able to advise on why this isn’t working? Hopefully I’m missing something simple here.



… when using an X11 session. On wayland, there is no way to specify the window icon other than the .desktop file.

The quartz backend doesn’t implement the functionality.

Ok, that makes sense, thanks for the explanation. Would I be correct to assume this is a limitation of the quartz platform, and therefore unlikely to be implemented in the future (as with wayland)?

In case it’s helpful to anyone else, I’ve been able to work around this by setting up a proper mac “installer” with .icns file inside, which gets used as the application/window icon.

Maybe @hergertme can answer that?

(Sorry for the ping)

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.