cross-window support (fixes #4)