Avoiding flicker when handling synchronous repainting of desktop windows when they are resized.