iOS: Don't send focus out event when resigning responder without qGuiApp
During shutdown of the app the QUIView may hang around longer than the QIOSWindow or QGuiApplication, at which point we can't deliver the resigned responder status to QGuiApp as a focus out event. Fixes: QTBUG-123018 Change-Id: If377f037c3fb4c2026a2d8d757011f12171e8dd4 Reviewed-by: Doris Verria <doris.verria@qt.io> (cherry picked from commit a40d546496462e5366c24115707e43a0c8598dd3) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
f399eff35e
commit
7580f42606
@ -333,9 +333,11 @@ inline ulong getTimeStamp(UIEvent *event)
|
||||
|
||||
qImDebug() << self << "resigned first responder";
|
||||
|
||||
UIResponder *newResponder = FirstResponderCandidate::currentCandidate();
|
||||
if ([self responderShouldTriggerWindowDeactivation:newResponder])
|
||||
QWindowSystemInterface::handleFocusWindowChanged(nullptr, Qt::ActiveWindowFocusReason);
|
||||
if (qGuiApp) {
|
||||
UIResponder *newResponder = FirstResponderCandidate::currentCandidate();
|
||||
if ([self responderShouldTriggerWindowDeactivation:newResponder])
|
||||
QWindowSystemInterface::handleFocusWindowChanged(nullptr, Qt::ActiveWindowFocusReason);
|
||||
}
|
||||
|
||||
return YES;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user