summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qwindowsysteminterface.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/kernel/qwindowsysteminterface.cpp')
-rw-r--r--src/gui/kernel/qwindowsysteminterface.cpp27
1 files changed, 17 insertions, 10 deletions
diff --git a/src/gui/kernel/qwindowsysteminterface.cpp b/src/gui/kernel/qwindowsysteminterface.cpp
index a18f6d8f17..87aa0c60b9 100644
--- a/src/gui/kernel/qwindowsysteminterface.cpp
+++ b/src/gui/kernel/qwindowsysteminterface.cpp
@@ -110,8 +110,8 @@ void QWindowSystemInterface::handleGeometryChange(QWindow *tlw, const QRect &new
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)
@@ -126,8 +126,8 @@ void QWindowSystemInterface::handleCloseEvent(QWindow *tlw)
void QWindowSystemInterface::handleSynchronousCloseEvent(QWindow *tlw)
{
if (tlw) {
- QWindowSystemInterfacePrivate::CloseEvent e(tlw);
- QGuiApplicationPrivate::processWindowSystemEvent(&e);
+ handleCloseEvent(tlw);
+ QWindowSystemInterface::flushWindowSystemEvents();
}
}
@@ -495,16 +495,24 @@ void QWindowSystemInterface::handleExposeEvent(QWindow *tlw, const QRegion &regi
void QWindowSystemInterface::handleSynchronousExposeEvent(QWindow *tlw, const QRegion &region)
{
- 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;
@@ -609,5 +617,4 @@ void QWindowSystemInterface::handleTabletLeaveProximityEvent(int device, int poi
handleTabletLeaveProximityEvent(time, device, pointerType, uid);
}
-
QT_END_NAMESPACE