get window state