Cocoa integration - handle didResignKey correctly
When we receive didResignKey notification, before setting active window to null we check that [NSApp keyWindow] is nil, but it's not. At the same moment, [NSApp keyWindow] == windowNotification.object - so it's indeed the window that resigned the key status, it's just NSApp keyWindow that is not nil yet. Change-Id: Iedc85d806c7d583a2054dc4d7168af13c9c7a4e0 Task-number: QTBUG-49925 Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>
This commit is contained in:
parent
2613317512
commit
5ec108eb7a
@ -423,7 +423,7 @@ static NSString *_q_NSWindowDidChangeOcclusionStateNotification = nil;
|
||||
// set the active window to zero here, the new key window's
|
||||
// NSWindowDidBecomeKeyNotification hander will change the active window
|
||||
NSWindow *keyWindow = [NSApp keyWindow];
|
||||
if (!keyWindow) {
|
||||
if (!keyWindow || keyWindow == windowNotification.object) {
|
||||
// no new key window, go ahead and set the active window to zero
|
||||
if (!m_platformWindow->windowIsPopupType() && !m_isMenuView)
|
||||
QWindowSystemInterface::handleWindowActivated(0);
|
||||
|
Loading…
Reference in New Issue
Block a user