window: Simplify code by using splice_call (thanks Ralph Ritoch for the hint!)