window: fix coerced value

(int) 0.5 = 0, so there always was 0 instead of 50%