Verify that QWindow::fromWinId returned a QWindow before using it
Review Request #128260 - Created June 20, 2016 and submitted
Foreign window support is not available on all platforms. E.g. on Wayland this returns a nullptr. Thus we cannot use it.