(0,0) should be (0,0) of rectangle, not the window.