QIOSTextInputOverlay: Use new presentationWindow to access keyWindow
Accessing the keyWindow through UIApplication keyWindow was causing a crash. Fixes: QTBUG-125089 Change-Id: Ie02afd7875b490c1f72ff2e827ffa2204d0e9e81 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This commit is contained in:
parent
432ae2e7b9
commit
1ffa41d04d
@ -434,7 +434,7 @@ static void executeBlockWithoutAnimation(Block block)
|
|||||||
|
|
||||||
if (enabled) {
|
if (enabled) {
|
||||||
_focusView = [reinterpret_cast<UIView *>(qApp->focusWindow()->winId()) retain];
|
_focusView = [reinterpret_cast<UIView *>(qApp->focusWindow()->winId()) retain];
|
||||||
_desktopView = [qt_apple_sharedApplication().keyWindow.rootViewController.view retain];
|
_desktopView = [presentationWindow(nullptr).rootViewController.view retain];
|
||||||
Q_ASSERT(_focusView && _desktopView && _desktopView.superview);
|
Q_ASSERT(_focusView && _desktopView && _desktopView.superview);
|
||||||
[_desktopView addGestureRecognizer:self];
|
[_desktopView addGestureRecognizer:self];
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user