From a0a1d9c5816bd9acb84f6a248e964f9a4f292973 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Thu, 7 Mar 2019 17:01:19 +0100 Subject: iOS: Fix broken application background tracking MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit e0e1c7ec2da12 amazingly both removed and inverted key parts of the logic for tracking the background state of the application. Fixes: QTBUG-74272 Change-Id: I9a9e8720f32e8228d27ee6b6a1fb35e5f7b7cedc Reviewed-by: Timur Pocheptsov Reviewed-by: Tor Arne Vestbø --- src/plugins/platforms/ios/qioscontext.mm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/plugins/platforms/ios/qioscontext.mm') diff --git a/src/plugins/platforms/ios/qioscontext.mm b/src/plugins/platforms/ios/qioscontext.mm index fff66049ff..535e7d7aa6 100644 --- a/src/plugins/platforms/ios/qioscontext.mm +++ b/src/plugins/platforms/ios/qioscontext.mm @@ -306,7 +306,7 @@ bool QIOSContext::verifyGraphicsHardwareAvailability() Q_UNUSED(oldState); if (applicationBackgrounded && newState != Qt::ApplicationSuspended) { qCDebug(lcQpaGLContext) << "app no longer backgrounded, rendering enabled"; - applicationBackgrounded = true; + applicationBackgrounded = false; } } ); @@ -317,6 +317,7 @@ bool QIOSContext::verifyGraphicsHardwareAvailability() return; qCDebug(lcQpaGLContext) << "app backgrounded, rendering disabled"; + applicationBackgrounded = true; // By the time we receive this signal the application has moved into // Qt::ApplactionStateSuspended, and all windows have been obscured, -- cgit v1.2.3