I have some code halfway working in a branch, but I'm not sure how Capy works internally. https://github.com/geon/capy/tree/window-delegate