Added a 'fallback' for event handlers.

This allows events which don't have a valid `subwindow` member to still
happen. This is most important for the force-close method, which needs to
be able to work on any possible window.