Well FiberOptics, in my case it does work, because as I said I'm using a treeview switchbar, and I don't have no channel buttons, so the window always becomes active before I can close it.

And if I _am_ connected to a server, I can still use the on part event.