Hi, I have for quite sometime been wondering why on my system the FvwmIconMan background was getting left corrupted when another window was put on top of it, and then removed. Here is a patch.
The problem was that between 1.4.5 and now, an if() in draw_manager() was removed and the clear_empty_region() was (I think) moved. However it was moved to an if() with different conditions - it used to be called because numWindows > 0 (almost always) but this was no longer true. So, when an Expose event was received, the draw_managers was called and the clear_empty_region() was never called. So I added to the dirty_flags a REDRAW_BG flag, and set it from within man_exposed. This triggers the redrawing of the background for the expose events. Please take a look at the patch and include it in the next build. Thanks Dave
Index: modules/FvwmIconMan/xmanager.c =================================================================== RCS file: /home/cvs/fvwm/fvwm/modules/FvwmIconMan/xmanager.c,v retrieving revision 1.63 diff -u -u -r1.63 xmanager.c --- modules/FvwmIconMan/xmanager.c 2002/04/25 11:39:52 1.63 +++ modules/FvwmIconMan/xmanager.c 2002/05/23 04:12:25 @@ -35,6 +35,7 @@ #define STRING_CHANGED 16 #define REDRAW_BUTTON 32 #define GEOMETRY_CHANGED 64 +#define REDRAW_BG 128 /* manager dirty bits: */ /* GEOMETRY_CHANGED 64 same as with button */ @@ -1536,9 +1537,12 @@ set_button_geometry (man, man->buttons.buttons[i]); } + if (force_draw || update_geometry || (man->dirty_flags & REDRAW_BG)) { + ConsoleDebug (X11, "\tredrawing background\n"); + clear_empty_region (man); + } if (force_draw || update_geometry) { - clear_empty_region (man); /* maybe not usefull but safe */ if (man->colorsets[DEFAULT] >= 0 && Colorset[man->colorsets[DEFAULT]].pixmap == ParentRelative) @@ -1887,6 +1891,9 @@ h2 = man->geometry.boxheight; bp = man->buttons.buttons; + + /* Background must be redrawn */ + man->dirty_flags |= REDRAW_BG; if (FHaveShapeExtension) { Index: ChangeLog =================================================================== RCS file: /home/cvs/fvwm/fvwm/ChangeLog,v retrieving revision 1.1803 diff -u -u -r1.1803 ChangeLog --- ChangeLog 2002/05/22 19:37:38 1.1803 +++ ChangeLog 2002/05/23 04:20:15 @@ -1,3 +1,10 @@ +2002-05-22 Dave Trollope <[EMAIL PROTECTED]> + + * Modules/FvwmIconMan/xmanager.c: + (draw_manager): + (man_exposed): + Fix for background not being redrawn when the window is exposed. + 2002-05-22 olicha <[EMAIL PROTECTED]> * libs/Flocale.h: