I'm trying to clean up that unholy mess with icons in fvwm. In other words: I'm trying to give all (okay: most) icon related information a clear interface in icons.h and use that everywhere.
I started with the functions in icons.c that find out the window or pixmap to use at the icons. These are currently modifying the window structure directly. Unfortunately, GetIconPicture() is called from ewmh_icons.c recursively which makes this a whole lot more difficult. Also, ewmh_SetWmIconFromPixmap() is called from several places in fvwm. This should only be done from GetIconPicture(). For example, when fvwm wants to donate its icon to the ewmh hints, EWMH_DoUpdateWmIcon() (shouldn't this be called EWMH_DonateWmIcon?) which in turn calls ewmh_SetWmIconFromPixmap() again which modifies the window structure and then even calls GetIconPicture(). Olivier, can this be rewritten so that: 1) There is a function that just donates the icon without modifying the FvwmWindow (BTW, what happens if fvwm deletes the pixmap used in the hint?) 2) ewmh_SetWmIconFromPixmap() does not modify the window structure but instead just returns what it found through pointers. 3) Make all icon setup run through icons.c. I think update.c should not call EWMH_SetIconFromWMIcon() but some more generic function in icons.c that knows what to do and that makes the call to ewmh_icons.c if necessary. The knowledge about ewmh icons should be limited to as few files as possible. And then there are setup_icon() and change_icon() in add_window.c. In theory, when the icon changes for some reason it should be possible to simply call change_icon() and that takes care of anything else. (?) Bye Dominik ^_^ ^_^ -- Dominik Vogt, email: [EMAIL PROTECTED] LifeBits Aktiengesellschaft, Albrechtstr. 9, D-72072 Tuebingen fon: ++49 (0) 7071/7965-0, fax: ++49 (0) 7071/7965-20 -- Visit the official FVWM web page at <URL:http://www.fvwm.org/>. To unsubscribe from the list, send "unsubscribe fvwm-workers" in the body of a message to [EMAIL PROTECTED] To report problems, send mail to [EMAIL PROTECTED]