diff --git a/tests/auto/gui/kernel/qwindow/tst_foreignwindow.cpp b/tests/auto/gui/kernel/qwindow/tst_foreignwindow.cpp index a43939a21b4..8abb39b2e07 100644 --- a/tests/auto/gui/kernel/qwindow/tst_foreignwindow.cpp +++ b/tests/auto/gui/kernel/qwindow/tst_foreignwindow.cpp @@ -81,17 +81,13 @@ void tst_ForeignWindow::embedForeignWindow() NativeWindow nativeWindow; QVERIFY(nativeWindow); - // Top level windows may not have 0 as their winId, e.g. on - // XCB the root window of the screen is used. - const auto originalParentWinId = nativeWindow.parentWinId(); - // As a prerequisite to that, we must be able to reparent the foreign window std::unique_ptr foreignWindow(QWindow::fromWinId(nativeWindow)); foreignWindow->setParent(&parentWindow); QTRY_COMPARE(nativeWindow.parentWinId(), parentWindow.winId()); foreignWindow->setParent(nullptr); - QTRY_COMPARE(nativeWindow.parentWinId(), originalParentWinId); + QTRY_VERIFY(nativeWindow.parentWinId() != parentWindow.winId()); } #include