tst_QWindow: Set explicit window position to please qWaitForWindowActive
qWaitForWindowActive waits until the timeout for the window to receive a non-0x0 position, even when it's active, just in case the WM sets the position as a response to focus-in. Change-Id: I748cce2747f406a8cdff556465175f02675fcd13 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>bb10
parent
98f0b46689
commit
69a8c59b3f
|
|
@ -843,7 +843,10 @@ void tst_QWindow::activateAndClose()
|
|||
{
|
||||
for (int i = 0; i < 10; ++i) {
|
||||
QWindow window;
|
||||
window.show();
|
||||
// qWaitForWindowActive will block for the duration of
|
||||
// of the timeout if the window is at 0,0
|
||||
window.setGeometry(QGuiApplication::primaryScreen()->availableGeometry().adjusted(1, 1, -1, -1));
|
||||
window.showNormal();
|
||||
window.requestActivate();
|
||||
QVERIFY(QTest::qWaitForWindowActive(&window));
|
||||
QCOMPARE(qGuiApp->focusWindow(), &window);
|
||||
|
|
|
|||
Loading…
Reference in New Issue