widget2.showMinimized();
QTest::qWait(waitTime);
+ QEXPECT_FAIL("", "QTBUG-26418", Continue);
QVERIFY(qApp->activeWindow() == &widget1);
widget2.showMaximized();
QTest::qWait(waitTime);
QVERIFY(qApp->activeWindow() == &widget2);
widget2.showMinimized();
QTest::qWait(waitTime);
+ QEXPECT_FAIL("", "QTBUG-26418", Continue);
QVERIFY(qApp->activeWindow() == &widget1);
widget2.showNormal();
QTest::qWait(waitTime);
+#if 0 // QTBUG-26418, widget2 is always set to active
#ifndef Q_OS_WINCE
if (QSysInfo::WindowsVersion >= QSysInfo::WV_VISTA)
QEXPECT_FAIL("", "MS introduced new behavior after XP", Continue);
#endif
+#endif
QTest::qWait(waitTime);
QVERIFY(qApp->activeWindow() == &widget2);
widget2.hide();
widget1.setWindowState(widget1.windowState() ^ Qt::WindowMinimized);
QTest::qWait(100);
+#ifdef Q_OS_WIN
+ QEXPECT_FAIL("", "QTBUG-26420", Continue);
+#endif
VERIFY_STATE((Qt::WindowFullScreen|Qt::WindowMinimized));
QCOMPARE(widget1.windowHandle()->windowState(), Qt::WindowMinimized);
widget1.setWindowState(widget1.windowState() ^ Qt::WindowMinimized);
QTest::qWait(100);
+#ifdef Q_OS_WIN
+ QEXPECT_FAIL("", "QTBUG-26420", Continue);
+#endif
VERIFY_STATE(Qt::WindowFullScreen);
+#ifdef Q_OS_WIN
+ QEXPECT_FAIL("", "QTBUG-26420", Continue);
+#endif
QCOMPARE(widget1.windowHandle()->windowState(), Qt::WindowFullScreen);
widget1.setWindowState(Qt::WindowNoState);
VERIFY_STATE((Qt::WindowFullScreen|Qt::WindowMaximized));
QCOMPARE(widget1.windowHandle()->windowState(), Qt::WindowFullScreen);
+#ifdef Q_OS_WIN
+ QSKIP("QTBUG-26420");
+#endif
+
widget1.setWindowState(widget1.windowState() ^ Qt::WindowMinimized);
QTest::qWait(100);
VERIFY_STATE((Qt::WindowFullScreen|Qt::WindowMaximized|Qt::WindowMinimized));
{
ResizeWidget wTopLevel;
wTopLevel.show();
+ if (m_platform == QStringLiteral("windows"))
+ QSKIP("QTBUG-26424");
QCOMPARE (wTopLevel.m_resizeEventCount, 1); // initial resize event before paint for toplevels
wTopLevel.hide();
QSize safeSize(640,480);
void tst_QWidget::showMinimizedKeepsFocus()
{
+ if (m_platform == QStringLiteral("xcb"))
+ QSKIP("QTBUG-26424");
+
//here we test that minimizing a widget and restoring it doesn't change the focus inside of it
{
QWidget window;
child.setGeometry(childPos.x(), childPos.y(), child.width(), child.height());
child.show();
+#if 0 // QTBUG-26424
if (m_platform == QStringLiteral("xcb"))
QEXPECT_FAIL("", "On X11, the window manager will apply NorthWestGravity rules to 'child', which"
" means the top-left corner of the window frame will be placed at 'childPos'"
" causing this test to fail.", Continue);
+#endif
QCOMPARE(child.geometry().topLeft(), childPos);
QTRY_COMPARE(childTLW.pos(), tlwPos);
QTest::qWait(10);
parent.setWindowState(parent.windowState() ^ Qt::WindowMaximized);
QTest::qWait(10);
+ if (m_platform == QStringLiteral("xcb"))
+ QSKIP("QTBUG-26424");
QTRY_VERIFY(parent.windowState() & (Qt::WindowMinimized|Qt::WindowMaximized));
// ### when minimized and maximized at the same time, the geometry
// ### does *NOT* have to be the normal geometry, it could be the
QTRY_COMPARE(parent.geometry(), geom);
QTRY_COMPARE(parent.normalGeometry(), geom);
+ QSKIP("QTBUG-26420");
parent.showNormal();
parent.setWindowState(Qt:: WindowFullScreen | Qt::WindowMaximized);
parent.setWindowState(Qt::WindowMinimized | Qt:: WindowFullScreen | Qt::WindowMaximized);
QTest::qWait(50);
if (tlw.frameGeometry() != tlw.geometry())
QSKIP("Your window manager is too broken for this test");
+ if (m_platform == QStringLiteral("xcb"))
+ QSKIP("QTBUG-26424");
QCOMPARE(tlw.geometry(), tr);
-
}
// Windows CE does not support windowOpacity.
QVERIFY(widget.restoreGeometry(savedGeometry));
QTest::qWait(120);
QTRY_VERIFY(!(widget.windowState() & Qt::WindowFullScreen));
+#ifdef Q_OS_WIN
+ QEXPECT_FAIL("", "QTBUG-26421", Continue);
+#endif
QTRY_COMPARE(widget.geometry(), geom);
//Restore to full screen
widget.showNormal();
QTest::qWait(10);
+ if (m_platform == QStringLiteral("xcb") || m_platform == QStringLiteral("windows"))
+ QSKIP("QTBUG-26421");
+
if (expectedWindowState != Qt::WindowNoState) {
// restoring from maximized or fullscreen, we can only restore to the normal geometry
QTRY_COMPARE(widget.geometry(), expectedNormalGeometry);
expectedUpdateRegion -= QRect(QPoint(), topLevel.size() - QSize(10, 10));
QTRY_COMPARE(topLevel.gotPaintEvent, true);
+ if (m_platform == QStringLiteral("xcb"))
+ QSKIP("QTBUG-26424");
QCOMPARE(topLevel.partial, true);
QCOMPARE(topLevel.paintedRegion, expectedUpdateRegion);
}
w.setFixedSize(defaultSize + QSize(150, 150));
w.show();
QTest::qWait(50);
+ if (m_platform == QStringLiteral("xcb"))
+ QSKIP("QTBUG-26424");
QVERIFY(w.size() == defaultSize + QSize(150,150));
}
QCOMPARE(child.winIdChangeEventCount(), 1);
child.setParent(&parent2);
const WId winIdAfter = child.internalWinId();
+ if (m_platform == QStringLiteral("windows"))
+ QEXPECT_FAIL("", "QTBUG-26424", Continue);
QVERIFY(winIdBefore != winIdAfter);
QCOMPARE(child.winIdChangeEventCount(), 3);
// winId is set to zero during reparenting
const Qt::WindowFlags flags = child.windowFlags();
child.setWindowFlags(flags | Qt::Window);
const WId winIdAfter = child.internalWinId();
+ if (m_platform == QStringLiteral("windows"))
+ QEXPECT_FAIL("", "QTBUG-26424", Continue);
QVERIFY(winIdBefore != winIdAfter);
QCOMPARE(child.winIdChangeEventCount(), 3);
// winId is set to zero during reparenting
// reparenting should change the winId of the widget being reparented, but not of its children
w1->setParent(0);
+ if (m_platform == QStringLiteral("windows"))
+ QEXPECT_FAIL("", "QTBUG-26424", Continue);
QVERIFY(w1->winId() != winId1);
winId1 = w1->winId();
QCOMPARE(w2->winId(), winId2);
QCOMPARE(w3->winId(), winId3);
w1->setParent(parent);
+ if (m_platform == QStringLiteral("windows"))
+ QEXPECT_FAIL("", "QTBUG-26424", Continue);
QVERIFY(w1->winId() != winId1);
winId1 = w1->winId();
QCOMPARE(w2->winId(), winId2);
QCOMPARE(w3->winId(), winId3);
w2->setParent(0);
+ if (m_platform == QStringLiteral("windows"))
+ QEXPECT_FAIL("", "QTBUG-26424", Continue);
QVERIFY(w2->winId() != winId2);
winId2 = w2->winId();
QCOMPARE(w3->winId(), winId3);
w2->setParent(parent);
+ if (m_platform == QStringLiteral("windows"))
+ QEXPECT_FAIL("", "QTBUG-26424", Continue);
QVERIFY(w2->winId() != winId2);
winId2 = w2->winId();
QCOMPARE(w3->winId(), winId3);
w2->setParent(w1);
+ if (m_platform == QStringLiteral("windows"))
+ QEXPECT_FAIL("", "QTBUG-26424", Continue);
QVERIFY(w2->winId() != winId2);
winId2 = w2->winId();
QCOMPARE(w3->winId(), winId3);
w3->setParent(0);
+ if (m_platform == QStringLiteral("windows"))
+ QEXPECT_FAIL("", "QTBUG-26424", Continue);
QVERIFY(w3->winId() != winId3);
winId3 = w3->winId();
w3->setParent(w1);
+ if (m_platform == QStringLiteral("windows"))
+ QEXPECT_FAIL("", "QTBUG-26424", Continue);
QVERIFY(w3->winId() != winId3);
winId3 = w3->winId();
w3->setParent(w2);
+ if (m_platform == QStringLiteral("windows"))
+ QEXPECT_FAIL("", "QTBUG-26424", Continue);
QVERIFY(w3->winId() != winId3);
winId3 = w3->winId();
if (create && !widget.testAttribute(Qt::WA_WState_Created))
widget.create();
+ if (m_platform == QStringLiteral("windows") || m_platform == QStringLiteral("xcb")) {
+ QEXPECT_FAIL("window: only show", "QTBUG-26424", Continue);
+ QEXPECT_FAIL("window: show/hide", "QTBUG-26424", Continue);
+ QEXPECT_FAIL("window: show/hide/create", "QTBUG-26424", Continue);
+ }
QCOMPARE(widget.numberOfShowEvents, expectedShowEvents);
+ if (m_platform == QStringLiteral("windows") || m_platform == QStringLiteral("xcb")) {
+ QEXPECT_FAIL("window: show/hide", "QTBUG-26424", Continue);
+ QEXPECT_FAIL("window: show/hide/create", "QTBUG-26424", Continue);
+ }
QCOMPARE(widget.numberOfHideEvents, expectedHideEvents);
}
#ifdef Q_OS_MAC
QEXPECT_FAIL(0, "Cocoa compositor says to paint this twice.", Continue);
#endif
+ if (m_platform == QStringLiteral("windows"))
+ QEXPECT_FAIL("", "QTBUG-26424", Continue);
QTRY_COMPARE(w.numPaintEvents, 1);
QCOMPARE(w.visibleRegion(), QRegion(w.rect()));
widget.show();
QTest::qWaitForWindowShown(&widget);
QTest::qWait(20);
+ if (m_platform == QStringLiteral("windows")) {
+ QEXPECT_FAIL("130,100 0x200, flags 0", "QTBUG-26424", Continue);
+ QEXPECT_FAIL("130,50 0x0, flags 0", "QTBUG-26424", Continue);
+ }
QTRY_COMPARE(widget.geometry(), rect);
// setGeometry() while shown
RECT rt;
::GetWindowRect(winHandleOf(&widget), &rt);
QVERIFY(rt.left <= 0);
+ QEXPECT_FAIL("", "QTBUG-26424", Continue);
QVERIFY(rt.top <= 0);
}
#endif // defined (Q_OS_WIN) && !defined(Q_OS_WINCE)
QTest::qWait(10);
QTRY_COMPARE(widget.pos(), rect.topLeft());
+ if (m_platform == QStringLiteral("windows")) {
+ QEXPECT_FAIL("130,100 0x200, flags 0", "QTBUG-26424", Continue);
+ QEXPECT_FAIL("130,50 0x0, flags 0", "QTBUG-26424", Continue);
+ }
QTRY_COMPARE(widget.size(), rect.size());
// move() while shown
void tst_QWidget::popupEnterLeave()
{
+ if (m_platform == QStringLiteral("windows"))
+ QSKIP("QTBUG-26424");
+
QWidget parent;
parent.setWindowFlags(Qt::FramelessWindowHint);
parent.setGeometry(10, 10, 200, 100);
void tst_QWidget::showAndMoveChild()
{
+ if (m_platform == QStringLiteral("windows"))
+ QSKIP("QTBUG-26424");
+
QWidget parent(0, Qt::FramelessWindowHint);
// prevent custom styles
parent.setStyle(new QWindowsStyle);
QTest::mouseMove(frame);
QTest::qWait(900); // delay is 700
+ if (m_platform == QStringLiteral("xcb"))
+ QSKIP("QTBUG-26424");
QCOMPARE(spy1.count(), 1);
QCOMPARE(spy2.count(), 0);
if (pass == 0)
#endif
expected << qMakePair(&widget, QEvent::UpdateRequest);
+ if (m_platform == QStringLiteral("windows") || m_platform == QStringLiteral("xcb"))
+ QEXPECT_FAIL("", "QTBUG-26424", Continue);
QCOMPARE(spy.eventList(), expected);
}
#endif
expected << qMakePair(&widget, QEvent::UpdateRequest);
+ if (m_platform == QStringLiteral("windows") || m_platform == QStringLiteral("xcb"))
+ QEXPECT_FAIL("", "QTBUG-26424", Continue);
QCOMPARE(spy.eventList(), expected);
}
#endif
expected << qMakePair(&widget, QEvent::UpdateRequest);
+ if (m_platform == QStringLiteral("windows") || m_platform == QStringLiteral("xcb"))
+ QEXPECT_FAIL("", "QTBUG-26424", Continue);
QCOMPARE(spy.eventList(), expected);
}
}
//#define RENDER_DEBUG
void tst_QWidget::renderInvisible()
{
+ if (m_platform == QStringLiteral("xcb"))
+ QSKIP("QTBUG-26424");
+
QCalendarWidget *calendar = new QCalendarWidget;
// disable anti-aliasing to eliminate potential differences when subpixel antialiasing
// is enabled on the screen
void tst_QWidget::moveWindowInShowEvent()
{
+ if (m_platform == QStringLiteral("xcb"))
+ QSKIP("QTBUG-26424");
+
QFETCH(QPoint, initial);
QFETCH(QPoint, position);
// Make sure update requests are discarded until the widget is shown again.
widget.update(0, 0, 50, 50);
QTest::qWait(10);
+ if (m_platform == QStringLiteral("windows"))
+ QEXPECT_FAIL("", "QTBUG-26424", Continue);
QCOMPARE(widget.numPaintEvents, 0);
// Restore window.
widget.showNormal();
QTest::qWait(30);
+ if (m_platform == QStringLiteral("xcb"))
+ QSKIP("QTBUG-26424");
QTRY_COMPARE(widget.numPaintEvents, 1);
QCOMPARE(widget.paintedRegion, QRegion(0, 0, 50, 50));
}
child.setAttribute(Qt::WA_NativeWindow);
child.setAttribute(Qt::WA_DontCreateNativeAncestors);
window.show();
+ if (m_platform == QStringLiteral("xcb"))
+ QEXPECT_FAIL("", "QTBUG-26424", Continue);
QVERIFY(child.testAttribute(Qt::WA_Mapped));
widget.hide();
QVERIFY(!child.testAttribute(Qt::WA_Mapped));
QVERIFY(!paintOnScreenChild.internalWinId());
paintOnScreen.setAttribute(Qt::WA_PaintOnScreen);
+ if (m_platform == QStringLiteral("xcb") || m_platform == QStringLiteral("windows"))
+ QEXPECT_FAIL("", "QTBUG-26424", Continue);
QVERIFY(paintOnScreen.testAttribute(Qt::WA_NativeWindow));
+ if (m_platform == QStringLiteral("xcb") || m_platform == QStringLiteral("windows"))
+ QEXPECT_FAIL("", "QTBUG-26424", Continue);
QVERIFY(paintOnScreen.internalWinId());
+ if (m_platform == QStringLiteral("xcb") || m_platform == QStringLiteral("windows"))
+ QEXPECT_FAIL("", "QTBUG-26424", Continue);
QVERIFY(paintOnScreenChild.testAttribute(Qt::WA_NativeWindow));
+ if (m_platform == QStringLiteral("xcb") || m_platform == QStringLiteral("windows"))
+ QEXPECT_FAIL("", "QTBUG-26424", Continue);
QVERIFY(paintOnScreenChild.internalWinId());
// Check that widgets with the Qt::MSWindowsOwnDC attribute set
QVERIFY(!greatGrandChild.internalWinId());
topLevel.show();
+ if (m_platform == QStringLiteral("xcb") || m_platform == QStringLiteral("windows"))
+ QEXPECT_FAIL("", "QTBUG-26424", Continue);
QVERIFY(child.internalWinId());
+ if (m_platform == QStringLiteral("xcb") || m_platform == QStringLiteral("windows"))
+ QEXPECT_FAIL("", "QTBUG-26424", Continue);
QVERIFY(grandChild.internalWinId());
+ if (m_platform == QStringLiteral("xcb") || m_platform == QStringLiteral("windows"))
+ QEXPECT_FAIL("", "QTBUG-26424", Continue);
QVERIFY(greatGrandChild.internalWinId());
}
topLevel.show();
QVERIFY(topLevel.internalWinId());
+ if (m_platform == QStringLiteral("xcb") || m_platform == QStringLiteral("windows"))
+ QEXPECT_FAIL("", "QTBUG-26424", Continue);
QVERIFY(widget->testAttribute(Qt::WA_NativeWindow));
+ if (m_platform == QStringLiteral("xcb") || m_platform == QStringLiteral("windows"))
+ QEXPECT_FAIL("", "QTBUG-26424", Continue);
QVERIFY(child->internalWinId());
+ if (m_platform == QStringLiteral("xcb") || m_platform == QStringLiteral("windows"))
+ QEXPECT_FAIL("", "QTBUG-26424", Continue);
QVERIFY(child->testAttribute(Qt::WA_NativeWindow));
QVERIFY(!child->testAttribute(Qt::WA_PaintOnScreen));
QVERIFY(!dummy->internalWinId());
window.show();
QVERIFY(window.internalWinId());
+ if (m_platform == QStringLiteral("xcb") || m_platform == QStringLiteral("windows"))
+ QEXPECT_FAIL("", "QTBUG-26424", Continue);
QVERIFY(child.internalWinId());
+ if (m_platform == QStringLiteral("xcb") || m_platform == QStringLiteral("windows"))
+ QEXPECT_FAIL("", "QTBUG-26424", Continue);
QVERIFY(child.testAttribute(Qt::WA_NativeWindow));
+ if (m_platform == QStringLiteral("xcb") || m_platform == QStringLiteral("windows"))
+ QEXPECT_FAIL("", "QTBUG-26424", Continue);
QVERIFY(grandChild.internalWinId());
+ if (m_platform == QStringLiteral("xcb") || m_platform == QStringLiteral("windows"))
+ QEXPECT_FAIL("", "QTBUG-26424", Continue);
QVERIFY(grandChild.testAttribute(Qt::WA_NativeWindow));
+ if (m_platform == QStringLiteral("xcb") || m_platform == QStringLiteral("windows"))
+ QEXPECT_FAIL("", "QTBUG-26424", Continue);
QVERIFY(paintOnScreenWidget.internalWinId());
+ if (m_platform == QStringLiteral("xcb") || m_platform == QStringLiteral("windows"))
+ QEXPECT_FAIL("", "QTBUG-26424", Continue);
QVERIFY(paintOnScreenWidget.testAttribute(Qt::WA_NativeWindow));
}
widget.show();
QTest::qWaitForWindowShown(&widget);
QTest::qWait(10);
+ if (m_platform == QStringLiteral("windows"))
+ QEXPECT_FAIL("", "QTBUG-26424", Continue);
QTRY_COMPARE(widget.numPaintEvents, expectedRepaints);
widget.numPaintEvents = 0;
void tst_QWidget::immediateRepaintAfterShow()
{
+ if (m_platform == QStringLiteral("xcb"))
+ QSKIP("QTBUG-26424");
if (m_platform != QStringLiteral("xcb") && m_platform != QStringLiteral("windows"))
QSKIP("We don't support immediate repaint right after show on other platforms.");
#if !defined(Q_OS_WINCE_WM)
void tst_QWidget::taskQTBUG_4055_sendSyntheticEnterLeave()
{
+ if (m_platform == QStringLiteral("windows") || m_platform == QStringLiteral("xcb"))
+ QSKIP("QTBUG-26424");
class SELParent : public QWidget
{
public: