Thanks elmindreda,
I can confirm that by running glfwWindowHintString(GLFW_X11_CLASS_NAME, "icon");
before glfwCreateWindow()
I can set the WM_CLASS name to be “icon” which is then different from the window title, and by writing StartupWMClass=icon
in the desktop entry I can set the icon.
But I was wrong in my assumption that I could leave out the StartupWMClass
key from the desktop entry file as long as the WM_CLASS is the same as the executable name. There must be some other mechanism that makes that work for the gtkmm app.
The glfwSetWindowIcon()
still does not work for me. However, I am happy with the desktop entry solution and besides I don’t know how to file a bug report, so I will not do that unless you insist.
Thanks again for your help.