GNOME Bugzilla – Bug 116821
the decorated window don't have icon in the taskbar
Last modified: 2011-02-04 16:16:03 UTC
in win32, the decorated window don't have icon in the taskbar even gtk_window_set_icon have been called.
Is this still a problem in GTK 2.2.4? gdk_window_set_icon got implemented in 2.2.4 (2.2.3 actually).
I'm using V2.2.4 (downloaded from your site on 1st September) and I get different results on different versions of windows, but none of them are quite right. I create a pixbuf with gdk_pixbuf_new_from_data() and then pass that to gtk_window_set_icon(). It's a 16x16 pixel icon with two colours, one is my foreground and should be very light blue (RGB 0xE0E0FF) and the other is my background and should be dark blue (RGB 0x0000FF). On Windows 2000 (SP2), the icon seems to be shown correctly in the title bar when my application has focus (although I think that the foreground colour is more yellow than light blue) but looks different when it doesn't (more of a dark blue foreground on the normal grey title bar background colour). The icon in the task bar is always present but the colours are wrong (appears as a dark colour on a yellow background, which when should with "Magnifier" with the colours inverted looks perfect!). On Windows XP, the icon in the title bar is present but again with the wrong colours (seems to be yellow on green when in focus, but a dark red on yellow otherwise, which again when inverted with "Magnifier" look perfect). However, there is never an icon in the task bar, just a blank space next to the application title. So, the original problem still seems to be present under XP at least. Perhaps the colour issue is something I'm doing wrong.
Please attach a minimal but complete sample program...
Created attachment 21034 [details] Source code for simple test program showing the problem
Created attachment 21035 [details] Executable built from the above test program (obviously needs DLLs etc.)
The attached program shows the problem I described earlier. As I said, perhaps it's something I'm doing wrong?
Solving this will require some heavy debugging and tracing of what happens in gdk-pixbuf and gdk/win32. Won't probably happen soon.
My patch for gdk_window_set_window_list in bug #128762 also appears to fix this bug. I believe that the bug is in get_pixmap_and_mask in gtk/gtkwindow.c. It uses gdk_screen_get_system_colormap(gdk_drawable_get_screen(window)) to get the colormap to pass to gdk_pixbuf_render_pixmap_and_mask_for_colormap. I found that using gdk_drawable_get_colormap(window) worked for me.
The patch for bug #128762 (which was applied) indeed also fixes this one, thus resolving as a duplicate. *** This bug has been marked as a duplicate of 128762 ***