Improve cast

Define a QWaylandWindow::parent() method so that casting is not
necessary.