I have a program that attaches a listener to an object every time the window switches, and then calls a delegate when an event occurs on this window.
The problem is t