lib: Window: Optimize resize routines.

Avoid intermediate painting, just show final result.