GNOME Bugzilla – Bug 155658
icon_window not used by gdk_window_set_icon()
Last modified: 2004-12-22 21:47:04 UTC
The problem has been reported here: http://bugs.debian.org/276734 "I've noticed that a recent update seems to have broken the gdk_window_set_icon() function, at least as far as using the icon_window parameter. Specifically, it doesn't seem to get around to setting the IconWindowHint on the leader window. If i set this one hint manually, it works as expected." A window-maker test program is attached in the original bug report. I've made a small test case that creates 2 windows and set the icon of the first with a pixmap and the second with the first. The icon is not changed ...
Created attachment 32704 [details] test case
I think this is because update_wm_hints() refuses to set hints on withdrawn windows.
2004-10-18 Matthias Clasen <mclasen@redhat.com> Fix #155658, Sebastian Bacher: * gdk/x11/gdkwindow-x11.h (struct _GdkToplevelX11): Add a new is_leader flag. * gdk/x11/gdkwindow-x11.c (update_wm_hints): Set wm hints on leader windows even if they are withdrawn. (gdk_window_set_group): Mark the new leader window as such. We never remove the flag again, but that should a) be vanishingly rare and b) not a problem, since the flag just turns off an optimization. * gdk/x11/gdkdisplay-x11.c (gdk_display_open): Mark the default leader window as such.