Add a listener to the window.
void addListener(WindowListener listener) { _listeners.add(listener); }