summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/gui/kernel/qwindowsysteminterface_qpa.cpp5
-rw-r--r--src/gui/kernel/qwindowsysteminterface_qpa.h1
-rw-r--r--src/plugins/platforms/cocoa/qcocoawindow.mm3
3 files changed, 7 insertions, 2 deletions
diff --git a/src/gui/kernel/qwindowsysteminterface_qpa.cpp b/src/gui/kernel/qwindowsysteminterface_qpa.cpp
index 047c134b69..9b3d691805 100644
--- a/src/gui/kernel/qwindowsysteminterface_qpa.cpp
+++ b/src/gui/kernel/qwindowsysteminterface_qpa.cpp
@@ -93,6 +93,11 @@ void QWindowSystemInterface::handleGeometryChange(QWindow *tlw, const QRect &new
QWindowSystemInterfacePrivate::queueWindowSystemEvent(e);
}
+void QWindowSystemInterface::handleSynchronousGeometryChange(QWindow *tlw, const QRect &newRect)
+{
+ QWindowSystemInterfacePrivate::GeometryChangeEvent *e = new QWindowSystemInterfacePrivate::GeometryChangeEvent(tlw,newRect);
+ QGuiApplicationPrivate::processWindowSystemEvent(e); // send event immediately.
+}
void QWindowSystemInterface::handleCloseEvent(QWindow *tlw)
{
diff --git a/src/gui/kernel/qwindowsysteminterface_qpa.h b/src/gui/kernel/qwindowsysteminterface_qpa.h
index 52838e03c5..dcfd7f1651 100644
--- a/src/gui/kernel/qwindowsysteminterface_qpa.h
+++ b/src/gui/kernel/qwindowsysteminterface_qpa.h
@@ -95,6 +95,7 @@ public:
static void handleTouchEvent(QWindow *w, ulong timestamp, QEvent::Type type, QTouchEvent::DeviceType devType, const QList<struct TouchPoint> &points);
static void handleGeometryChange(QWindow *w, const QRect &newRect);
+ static void handleSynchronousGeometryChange(QWindow *w, const QRect &newRect);
static void handleCloseEvent(QWindow *w);
static void handleEnterEvent(QWindow *w);
static void handleLeaveEvent(QWindow *w);
diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm
index 08a45cba6b..fefdbc8205 100644
--- a/src/plugins/platforms/cocoa/qcocoawindow.mm
+++ b/src/plugins/platforms/cocoa/qcocoawindow.mm
@@ -154,10 +154,9 @@ void QCocoaWindow::windowDidMove()
void QCocoaWindow::windowDidResize()
{
- //jlind: XXX This isn't ideal. Eventdispatcher does not run when resizing...
NSRect rect = [[m_nsWindow contentView]frame];
QRect geo(rect.origin.x,rect.origin.y,rect.size.width,rect.size.height);
- QWindowSystemInterface::handleGeometryChange(window(),geo);
+ QWindowSystemInterface::handleSynchronousGeometryChange(window(), geo);
if (m_glContext)
m_glContext->update();