The window manager needs a message pump in order to call you back unexpectedly
There are a bunch of different ways of asking the window manager to call you when something interesting happens. Some of them are are in response to things that you explicitly asked for right now. The enumeration functions are classic examples of this. If you call and pass a callback function, then that callback is called directly from the enumera...