This seems to solve the bug that changes the color palette when SheepShaver is minimized, etc., though I don't know whether it introduces any bad effects.
In video_sdl.cpp, comment out the line that I've indicated with "////// " below:
Code:
// Application activate/deactivate
case SDL_ACTIVEEVENT:
// Force a complete window refresh when activating, to avoid redraw artifacts otherwise.
////// if (event.active.gain && (event.active.state & SDL_APPACTIVE))
force_complete_window_refresh();
break;
There's a slight "snap" in the video when the app gets restored from the minimized state, but that's a lot better than the wrong palette colors.
I don't claim to understand any of this, but it seems that this also works (simply truncating the line that is commented out in the earlier code block, instead of removing it entirely):
Code:
// Application activate/deactivate
case SDL_ACTIVEEVENT:
// Force a complete window refresh when activating, to avoid redraw artifacts otherwise.
if (event.active.gain) // changed by removing second condition
force_complete_window_refresh();
break;
Since I don't know what all this means, I hope someone who is more expert than I am can get it completely right.