window: Fix casts

1 job for warnings-split in 2 minutes and 5 seconds (queued for 2 seconds)