fixed window size calculation