This fixes a bug where opening a foreground window could occasionally
prevent background windows from repainting. The symptom seems to be
caused by the system repeatedly sending WM_PAINT messages to the
foreground window and ignoring the background window. It seems that the
system will repeatedly call WM_PAINT until the entire region has been
validated - even if that region is null.