Support window close action for HAXWindow

Depends on #12.