prepare for resizable window