Skip to content

Commit

Permalink
Windows QPA: Send synthesized expose events when window shrinks.
Browse files Browse the repository at this point in the history
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ł <[email protected]>
Reviewed-by: Shawn Rutledge <[email protected]>
  • Loading branch information
Friedemann Kleint authored and Friedemann Kleint committed Feb 23, 2016
1 parent b8f89d8 commit 20a29fb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/plugins/platforms/windows/qwindowswindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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()) {
Expand Down

0 comments on commit 20a29fb

Please sign in to comment.