WaitForFinished blocks our main thread, but Xwayland wants to talk to Wayland and blocks as well. So let's ensure events are processed while terminating Xwayland.