window: Small code cleanup