disable some actions when no window is open