The rectangle needs to be converted to window coordinates before passing it in to this method.

Also, what happens if this view doesn't have a window?