use correct window size for snapshot function