diff options
Diffstat (limited to 'src/plugins/platforms/cocoa/qnsview.mm')
-rw-r--r-- | src/plugins/platforms/cocoa/qnsview.mm | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/platforms/cocoa/qnsview.mm b/src/plugins/platforms/cocoa/qnsview.mm index 5972cf9504..fcfc805348 100644 --- a/src/plugins/platforms/cocoa/qnsview.mm +++ b/src/plugins/platforms/cocoa/qnsview.mm @@ -432,7 +432,7 @@ static bool _q_dontOverrideCtrlLMB = false; // 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); @@ -525,7 +525,7 @@ QT_WARNING_POP m_backingStore = backingStore; m_backingStoreOffset = offset * m_backingStore->getBackingStoreDevicePixelRatio(); - foreach (QRect rect, region.rects()) + for (const QRect &rect : region) [self setNeedsDisplayInRect:NSMakeRect(rect.x(), rect.y(), rect.width(), rect.height())]; } |