fix #856: reactivate window after alert dialog is closed

after the dialog is closed, I call setFocus to make its parent_window get focus.