void QWindowSystemInterface::handleSynchronousGeometryChange(QWindow *tlw, const QRect &newRect)
{
- QWindowSystemInterfacePrivate::GeometryChangeEvent e(tlw,newRect);
- QGuiApplicationPrivate::processWindowSystemEvent(&e); // send event immediately.
+ handleGeometryChange(tlw, newRect);
+ QWindowSystemInterface::flushWindowSystemEvents();
}
void QWindowSystemInterface::handleCloseEvent(QWindow *tlw)
void QWindowSystemInterface::handleSynchronousCloseEvent(QWindow *tlw)
{
if (tlw) {
- QWindowSystemInterfacePrivate::CloseEvent e(tlw);
- QGuiApplicationPrivate::processWindowSystemEvent(&e);
+ handleCloseEvent(tlw);
+ QWindowSystemInterface::flushWindowSystemEvents();
}
}
void QWindowSystemInterface::handleSynchronousExposeEvent(QWindow *tlw, const QRegion ®ion)
{
- QWindowSystemInterfacePrivate::ExposeEvent e(tlw, region);
- QGuiApplicationPrivate::processWindowSystemEvent(&e); // send event immediately.
+ QWindowSystemInterface::handleExposeEvent(tlw, region);
+ QWindowSystemInterface::flushWindowSystemEvents();
+}
+
+void QWindowSystemInterface::flushWindowSystemEvents()
+{
+ sendWindowSystemEventsImplementation(QEventLoop::AllEvents);
}
bool QWindowSystemInterface::sendWindowSystemEvents(QEventLoop::ProcessEventsFlags flags)
{
- int nevents = 0;
+ QCoreApplication::sendPostedEvents(); // handle gui and posted events
+ return sendWindowSystemEventsImplementation(flags);
+}
- // handle gui and posted events
- QCoreApplication::sendPostedEvents();
+bool QWindowSystemInterface::sendWindowSystemEventsImplementation(QEventLoop::ProcessEventsFlags flags)
+{
+ int nevents = 0;
while (true) {
QWindowSystemInterfacePrivate::WindowSystemEvent *event;
handleTabletLeaveProximityEvent(time, device, pointerType, uid);
}
-
QT_END_NAMESPACE
// For event dispatcher implementations
static bool sendWindowSystemEvents(QEventLoop::ProcessEventsFlags flags);
+ static void flushWindowSystemEvents();
static int windowSystemEventsQueued();
+
+private:
+ static bool sendWindowSystemEventsImplementation(QEventLoop::ProcessEventsFlags flags);
};
QT_END_NAMESPACE
if (m_data.hwnd) {
if (visible) {
show_sys();
- QWindowSystemInterface::handleSynchronousExposeEvent(window(),
- QRect(QPoint(), geometry().size()));
+ QWindowSystemInterface::handleExposeEvent(window(),
+ QRect(QPoint(), geometry().size()));
} else {
hide_sys();
- QWindowSystemInterface::handleSynchronousExposeEvent(window(), QRegion());
+ QWindowSystemInterface::handleExposeEvent(window(), QRegion());
}
}
}
QVERIFY(layouted.isFullScreen());
layouted.showFullScreen();
+ if (m_platform == QStringLiteral("windows"))
+ QEXPECT_FAIL("", "QTBUG-26424", Continue);
QVERIFY(!layouted.isMinimized());
QVERIFY(layouted.isFullScreen());
QVERIFY(layouted.isVisible());
#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();
QVERIFY(QTest::qWaitForWindowExposed(&widget));
QTest::qWait(10);
- if (m_platform == QStringLiteral("windows"))
- QEXPECT_FAIL("", "QTBUG-26424", Continue);
QTRY_COMPARE(widget.numPaintEvents, expectedRepaints);
widget.numPaintEvents = 0;