summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/android/androidjnimain.cpp
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2017-06-19 13:25:11 +0200
committerLiang Qi <liang.qi@qt.io>2017-06-19 16:12:34 +0200
commitce09ef431373f45d14ce0a6e7de24aee3666093d (patch)
tree7c998b21f02db55e233e7eeb1599663f1c6b51ca /src/plugins/platforms/android/androidjnimain.cpp
parent7ad55ca65f42351e231f31f7a9253ae6eaf1ebb3 (diff)
parent97eec16e4ff6367c233f8ea6c4a343c286c3a514 (diff)
Merge remote-tracking branch 'origin/5.9' into dev
Conflicts: src/corelib/io/qprocess_unix.cpp src/corelib/io/qprocess_win.cpp src/plugins/platforms/android/qandroidplatformintegration.h src/plugins/platforms/windows/qwindowscontext.cpp src/plugins/platforms/windows/windows.pri src/tools/uic/cpp/cppwriteinitialization.cpp src/widgets/doc/src/widgets-and-layouts/gallery.qdoc Change-Id: I8d0834c77f350ea7540140c2c7f372814afc2d0f
Diffstat (limited to 'src/plugins/platforms/android/androidjnimain.cpp')
-rw-r--r--src/plugins/platforms/android/androidjnimain.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/plugins/platforms/android/androidjnimain.cpp b/src/plugins/platforms/android/androidjnimain.cpp
index e47dd91a3e..06bca0354d 100644
--- a/src/plugins/platforms/android/androidjnimain.cpp
+++ b/src/plugins/platforms/android/androidjnimain.cpp
@@ -102,13 +102,6 @@ static QList<QByteArray> m_applicationParams;
pthread_t m_qtAppThread = 0;
static sem_t m_exitSemaphore, m_terminateSemaphore;
-struct SurfaceData
-{
- ~SurfaceData() { delete surface; }
- QJNIObjectPrivate *surface = nullptr;
- AndroidSurfaceClient *client = nullptr;
-};
-
QHash<int, AndroidSurfaceClient *> m_surfaces;
static QMutex m_surfacesMutex;
@@ -142,6 +135,7 @@ namespace QtAndroid
// flush the pending state if necessary.
if (m_androidPlatformIntegration) {
flushPendingApplicationState();
+ m_androidPlatformIntegration->flushPendingUpdates();
} else {
QMutexLocker locker(&m_pendingAppStateMtx);
m_pendingApplicationState = -1;
@@ -627,6 +621,7 @@ static void setDisplayMetrics(JNIEnv */*env*/, jclass /*clazz*/,
m_scaledDensity = scaledDensity;
m_density = density;
+ QMutexLocker lock(&m_surfacesMutex);
if (!m_androidPlatformIntegration) {
QAndroidPlatformIntegration::setDefaultDisplayMetrics(desktopWidthPixels,
desktopHeightPixels,
@@ -691,7 +686,6 @@ static void updateApplicationState(JNIEnv */*env*/, jobject /*thiz*/, jint state
// Don't send timers and sockets events anymore if we are going to hide all windows
QAndroidEventDispatcherStopper::instance()->goingToStop(true);
- QCoreApplication::processEvents();
QWindowSystemInterface::handleApplicationStateChanged(Qt::ApplicationState(state));
if (state == Qt::ApplicationSuspended)
QAndroidEventDispatcherStopper::instance()->stopAll();