Windows: Synthesize expose event for shrinking windows.
Synthesize expose events for all Windows except ANGLE-windows. Task-number: QTBUG-32121 Change-Id: Ifbff2730ec8f2e8cfe23eeb4022b76a6e432598e Reviewed-by: Oliver Wolff <oliver.wolff@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
This commit is contained in:
parent
e4484bb15b
commit
49a55be973
@ -808,8 +808,12 @@ QWindowsWindow::QWindowsWindow(QWindow *aWindow, const WindowData &data) :
|
|||||||
const Qt::WindowType type = aWindow->type();
|
const Qt::WindowType type = aWindow->type();
|
||||||
if (type == Qt::Desktop)
|
if (type == Qt::Desktop)
|
||||||
return; // No further handling for Qt::Desktop
|
return; // No further handling for Qt::Desktop
|
||||||
if (aWindow->surfaceType() == QWindow::OpenGLSurface)
|
if (aWindow->surfaceType() == QWindow::OpenGLSurface) {
|
||||||
setFlag(OpenGLSurface);
|
setFlag(OpenGLSurface);
|
||||||
|
#ifdef QT_OPENGL_ES_2
|
||||||
|
setFlag(OpenGL_ES2);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
if (aWindow->isTopLevel()) {
|
if (aWindow->isTopLevel()) {
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case Qt::Window:
|
case Qt::Window:
|
||||||
@ -1233,9 +1237,16 @@ void QWindowsWindow::handleGeometryChange()
|
|||||||
//Prevent recursive resizes for Windows CE
|
//Prevent recursive resizes for Windows CE
|
||||||
if (testFlag(WithinSetStyle))
|
if (testFlag(WithinSetStyle))
|
||||||
return;
|
return;
|
||||||
|
const QRect previousGeometry = m_data.geometry;
|
||||||
m_data.geometry = geometry_sys();
|
m_data.geometry = geometry_sys();
|
||||||
QPlatformWindow::setGeometry(m_data.geometry);
|
QPlatformWindow::setGeometry(m_data.geometry);
|
||||||
QWindowSystemInterface::handleGeometryChange(window(), m_data.geometry);
|
QWindowSystemInterface::handleGeometryChange(window(), m_data.geometry);
|
||||||
|
// 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())) {
|
||||||
|
fireExpose(QRegion(m_data.geometry), true);
|
||||||
|
}
|
||||||
if (testFlag(SynchronousGeometryChangeEvent))
|
if (testFlag(SynchronousGeometryChangeEvent))
|
||||||
QWindowSystemInterface::flushWindowSystemEvents();
|
QWindowSystemInterface::flushWindowSystemEvents();
|
||||||
|
|
||||||
|
@ -124,18 +124,19 @@ public:
|
|||||||
WithinSetParent = 0x2,
|
WithinSetParent = 0x2,
|
||||||
FrameDirty = 0x4, //! Frame outdated by setStyle, recalculate in next query.
|
FrameDirty = 0x4, //! Frame outdated by setStyle, recalculate in next query.
|
||||||
OpenGLSurface = 0x10,
|
OpenGLSurface = 0x10,
|
||||||
OpenGLDoubleBuffered = 0x20,
|
OpenGL_ES2 = 0x20,
|
||||||
OpenGlPixelFormatInitialized = 0x40,
|
OpenGLDoubleBuffered = 0x40,
|
||||||
BlockedByModal = 0x80,
|
OpenGlPixelFormatInitialized = 0x80,
|
||||||
SizeGripOperation = 0x100,
|
BlockedByModal = 0x100,
|
||||||
FrameStrutEventsEnabled = 0x200,
|
SizeGripOperation = 0x200,
|
||||||
SynchronousGeometryChangeEvent = 0x400,
|
FrameStrutEventsEnabled = 0x400,
|
||||||
WithinSetStyle = 0x800,
|
SynchronousGeometryChangeEvent = 0x800,
|
||||||
WithinDestroy = 0x1000,
|
WithinSetStyle = 0x1000,
|
||||||
TouchRegistered = 0x2000,
|
WithinDestroy = 0x2000,
|
||||||
AlertState = 0x4000,
|
TouchRegistered = 0x4000,
|
||||||
Exposed = 0x08000,
|
AlertState = 0x8000,
|
||||||
WithinCreate = 0x10000
|
Exposed = 0x10000,
|
||||||
|
WithinCreate = 0x20000
|
||||||
};
|
};
|
||||||
|
|
||||||
struct WindowData
|
struct WindowData
|
||||||
|
Loading…
x
Reference in New Issue
Block a user