From dc55000140f394af74d1ca40fa9804e780b867e5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Mon, 9 Apr 2018 15:46:14 +0200 Subject: iOS: Don't assume our UIWindow is a QUIWindow Change-Id: I6494e4a476273b131aedcf409abdb1ffffa5b62e Reviewed-by: Richard Moe Gustavsen (cherry picked from commit ab9b026d2734321f1d5a06b79f97107a867687c3) --- src/plugins/platforms/ios/quiview.mm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/plugins/platforms/ios/quiview.mm b/src/plugins/platforms/ios/quiview.mm index 29afae7176..8db36705c0 100644 --- a/src/plugins/platforms/ios/quiview.mm +++ b/src/plugins/platforms/ios/quiview.mm @@ -440,7 +440,8 @@ Q_LOGGING_CATEGORY(lcQpaTablet, "qt.qpa.input.tablet") if (m_activeTouches.isEmpty()) return; - if (!static_cast(self.window).sendingEvent) { + if ([self.window isKindOfClass:[QUIWindow class]] && + !static_cast(self.window).sendingEvent) { // The event is likely delivered as part of delayed touch delivery, via // _UIGestureEnvironmentSortAndSendDelayedTouches, due to one of the two // _UISystemGestureGateGestureRecognizer instances on the top level window -- cgit v1.2.3