Reduce flicker when resizing windows.