window state and geometry setting