summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/cocoa
diff options
context:
space:
mode:
authorMorten Johan Sørvig <morten.sorvig@qt.io>2018-04-11 12:31:11 +0200
committerMorten Johan Sørvig <morten.sorvig@qt.io>2018-04-24 19:48:50 +0000
commit0f6a6b2bffb9b9d0a5db8b9473fda108d14e9915 (patch)
tree7b495c5935ddc7a4c70590b8e7949c3f66d9e559 /src/plugins/platforms/cocoa
parentc7eb2c173e79f2936985cd7589347e59b6005c7c (diff)
Cocoa: Don’t starve the event loop on requestUpdate()
Some of our examples, and perhaps also some applications, call requestUpdate() immediately after producing a frame. This can cause Cocoa to immediately start (trying to) draw a new frame without processing e.g. input events. This should (and will) be handled by rate limiting updates with CVDisplayLink. In the mean time fall back to using the base class QPlatformWindow implementation, which is implemented using a timer, which will allow for input event processing. Change-Id: Ic2541f344b2f4018d785404a06274959a7bad2df Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
Diffstat (limited to 'src/plugins/platforms/cocoa')
-rw-r--r--src/plugins/platforms/cocoa/qcocoawindow.mm2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm
index f9d16ab1c6..965a15a548 100644
--- a/src/plugins/platforms/cocoa/qcocoawindow.mm
+++ b/src/plugins/platforms/cocoa/qcocoawindow.mm
@@ -1336,7 +1336,7 @@ void QCocoaWindow::recreateWindowIfNeeded()
void QCocoaWindow::requestUpdate()
{
qCDebug(lcQpaCocoaDrawing) << "QCocoaWindow::requestUpdate" << window();
- [qnsview_cast(m_view) requestUpdate];
+ QPlatformWindow::requestUpdate();
}
void QCocoaWindow::requestActivateWindow()