Weirdly it still doesn't quite do what I want. It leaves a gap around the edge of the window for some reason.