refine adjusting window height & window titlebar