summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/windows
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2016-02-11 09:48:06 +0100
committerFriedemann Kleint <Friedemann.Kleint@theqtcompany.com>2016-02-23 07:53:02 +0000
commit20a29fbfe834c108517a23db359827d067246ecd (patch)
treeac9208b92f4010d8f13e7af17e81524f010305c8 /src/plugins/platforms/windows
parentb8f89d8ef3f695746a8a48084d8ea710eb508d3d (diff)
Windows QPA: Send synthesized expose events when window shrinks.
Fix the condition to check for plain move events and gain in one dimension in which case Windows will send events. Task-number: QTBUG-51038 Change-Id: I60433657f37275ee302f745291e79e465d52064d Reviewed-by: Błażej Szczygieł <spaz16@wp.pl> Reviewed-by: Shawn Rutledge <shawn.rutledge@theqtcompany.com>
Diffstat (limited to 'src/plugins/platforms/windows')
-rw-r--r--src/plugins/platforms/windows/qwindowswindow.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/plugins/platforms/windows/qwindowswindow.cpp b/src/plugins/platforms/windows/qwindowswindow.cpp
index cb733ed5bd..e2f5885047 100644
--- a/src/plugins/platforms/windows/qwindowswindow.cpp
+++ b/src/plugins/platforms/windows/qwindowswindow.cpp
@@ -1467,7 +1467,9 @@ 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.size() != previousGeometry.size() // Exclude plain move
+ // One dimension grew -> Windows will send expose, no need to synthesize.
+ && !(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()) {