summaryrefslogtreecommitdiffstats
path: root/tests/auto/gui/kernel
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2023-11-17 13:53:57 +0100
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2023-11-19 16:08:06 +0100
commit340b9729953faa12ed889630ffb9f2eeca228649 (patch)
tree356dac7905b625a26e6e01a2450e253246d95a89 /tests/auto/gui/kernel
parent635774fc324f079a41e2cecbcfdb700bf171ab6c (diff)
Stabilize tst_ForeignWindow::embedForeignWindow()
We only care about no longer being a child of the old parent window, not what the system does when we reparent to nullptr. Pick-to: 6.6 Change-Id: Ibd670432f0fd2595195d3951014a570dfdb7a998 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'tests/auto/gui/kernel')
-rw-r--r--tests/auto/gui/kernel/qwindow/tst_foreignwindow.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/tests/auto/gui/kernel/qwindow/tst_foreignwindow.cpp b/tests/auto/gui/kernel/qwindow/tst_foreignwindow.cpp
index ac0f78be2d..86d31fe06e 100644
--- a/tests/auto/gui/kernel/qwindow/tst_foreignwindow.cpp
+++ b/tests/auto/gui/kernel/qwindow/tst_foreignwindow.cpp
@@ -82,17 +82,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<QWindow> 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());
}
void tst_ForeignWindow::embedInForeignWindow()