Add event handling support for multiple windows.