Android: Fix expose region.
It seems that the second parameter of handleExposeEvent function is about the region inside the window, not its position on the screen. Change-Id: I89f5b2b13c9b0993253542823a84547d6a994c31 Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
This commit is contained in:
parent
96f0ff4f28
commit
80c6f00efa
@ -593,7 +593,7 @@ static void updateWindow(JNIEnv */*env*/, jobject /*thiz*/)
|
||||
foreach (QWindow *w, QGuiApplication::topLevelWindows()) {
|
||||
QRect availableGeometry = w->screen()->availableGeometry();
|
||||
if (w->geometry().width() > 0 && w->geometry().height() > 0 && availableGeometry.width() > 0 && availableGeometry.height() > 0)
|
||||
QWindowSystemInterface::handleExposeEvent(w, QRegion(w->geometry()));
|
||||
QWindowSystemInterface::handleExposeEvent(w, QRegion(QRect(QPoint(), w->geometry().size())));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -120,7 +120,7 @@ void QAndroidPlatformOpenGLWindow::checkNativeSurface(EGLConfig config)
|
||||
// we've create another surface, the window should be repainted
|
||||
QRect availableGeometry = screen()->availableGeometry();
|
||||
if (geometry().width() > 0 && geometry().height() > 0 && availableGeometry.width() > 0 && availableGeometry.height() > 0)
|
||||
QWindowSystemInterface::handleExposeEvent(window(), QRegion(geometry()));
|
||||
QWindowSystemInterface::handleExposeEvent(window(), QRegion(QRect(QPoint(), geometry().size())));
|
||||
}
|
||||
|
||||
void QAndroidPlatformOpenGLWindow::applicationStateChanged(Qt::ApplicationState state)
|
||||
@ -187,7 +187,7 @@ void QAndroidPlatformOpenGLWindow::surfaceChanged(JNIEnv *jniEnv, jobject surfac
|
||||
// repaint the window
|
||||
QRect availableGeometry = screen()->availableGeometry();
|
||||
if (geometry().width() > 0 && geometry().height() > 0 && availableGeometry.width() > 0 && availableGeometry.height() > 0)
|
||||
QWindowSystemInterface::handleExposeEvent(window(), QRegion(geometry()));
|
||||
QWindowSystemInterface::handleExposeEvent(window(), QRegion(QRect(QPoint(), geometry().size())));
|
||||
}
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
Loading…
Reference in New Issue
Block a user