diff options
author | Laszlo Agocs <laszlo.agocs@theqtcompany.com> | 2015-01-19 13:18:17 +0100 |
---|---|---|
committer | Laszlo Agocs <laszlo.agocs@theqtcompany.com> | 2015-01-19 17:48:05 +0100 |
commit | 91d6aafad4805fb760a51f64565929952a37c5bf (patch) | |
tree | e22c033b777ddf175043856a9cf33e7dd8b2defd /src/plugins/platforms/windows | |
parent | 6a081125a5b1b7d629a2c6e16a696ecc06dbb427 (diff) |
Windows: avoid generating exposes on plain moves
The fake expose generation for shrunk windows is causing
side effects with desktop GL: it will generate expose events
even when only moving the window. This is bad. So change the
condition to look for shrinking and do nothing if the size is
same as before.
This is reported to cause perf issues with e.g. QOpenGLWindow
or similar where an expose does an immediate repaint (potentially
with block swap).
Task-number: QTBUG-32121
Change-Id: I4687ea8210cee6691d608450c48b1dbef52d6df3
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Diffstat (limited to 'src/plugins/platforms/windows')
-rw-r--r-- | src/plugins/platforms/windows/qwindowswindow.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/platforms/windows/qwindowswindow.cpp b/src/plugins/platforms/windows/qwindowswindow.cpp index 0b72f6db4d..1d8645f5f4 100644 --- a/src/plugins/platforms/windows/qwindowswindow.cpp +++ b/src/plugins/platforms/windows/qwindowswindow.cpp @@ -1394,7 +1394,7 @@ void QWindowsWindow::handleGeometryChange() // QTBUG-32121: OpenGL/normal windows (with exception of ANGLE) do not receive // expose events when shrinking, synthesize. if (!testFlag(OpenGL_ES2) && isExposed() - && !(m_data.geometry.width() > previousGeometry.width() || m_data.geometry.height() > previousGeometry.height())) { + && !(m_data.geometry.width() >= previousGeometry.width() || m_data.geometry.height() >= previousGeometry.height())) { fireExpose(QRect(QPoint(0, 0), m_data.geometry.size()), true); } if (previousGeometry.topLeft() != m_data.geometry.topLeft()) { |