http://bugs.winehq.org/show_bug.cgi?id=3370
------- Additional Comments From juris.smotrovs@sets.lv 2006-12-06 08:10 ------- Created an attachment (id=2618) --> (http://bugs.winehq.org/attachment.cgi?id=2618&action=view) Patch enabling correctly setting application icon in WM
Craig, can you test whether this patch corrects your problem? At least it solves mine which seems to be the same: Wine icon shows in window manager caption and task bar instead of the application icon.
The problem is that, even though, at WM_SETICON the correct icon is set, a bit later X11DRV_set_wm_hints resets the icon black to class default. It seems that X11DRV_set_wm_hints was originally designed to be called only when creating a new window: it allocates icon hints instead of getting the existing ones, and sets the class default as the initial icon. However, later X11DRV_set_wm_hints calls have been added at window mapping and style change. Thus icon is reset to class default each time the window is mapped or its style changed.
My patch checks whether an icon has already been set for the window, and in such case does not reset the icon to class default. (The icons are set with WM_SETICON via another x11drv function X11DRV_SetWindowIcon.)