summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/cocoa/qcocoawindow.mm
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2023-10-27 14:59:36 +0200
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2023-10-30 18:28:57 +0000
commitbe7e5f94a1c0e63d6e4dbea5649d12cdc879d8f6 (patch)
tree92b7e466da00d90f51dc8099410132e73dbff54f /src/plugins/platforms/cocoa/qcocoawindow.mm
parenta9c47dde501d0e178a254920bd487dca956895be (diff)
macOS: Check NSWindow as well when determining if setVisible can bail out
In be268ae19731ab854931e43eea83e0e140ec2538 we made QCocoaWindow::setVisible idempotent by checking if NSView.hidden needed update. This failed to take into account the case when a window is moved from being a child window to a top level, where the window is still visible and the NSView's hidden state doesn't change, but we need to order in the NSWindow that we're now managing. We now check NSWindow.visible as well, if we're a top level window. Pick-to: 6.5 6.6 Change-Id: I94434d6ebfe2c9ece6eac7f83f17ead250ccc07a Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Diffstat (limited to 'src/plugins/platforms/cocoa/qcocoawindow.mm')
-rw-r--r--src/plugins/platforms/cocoa/qcocoawindow.mm2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm
index 7eb2a350d3..dcdbaedc20 100644
--- a/src/plugins/platforms/cocoa/qcocoawindow.mm
+++ b/src/plugins/platforms/cocoa/qcocoawindow.mm
@@ -320,7 +320,7 @@ void QCocoaWindow::setVisible(bool visible)
return; // We'll get another setVisible call after create is done
}
- if (visible == !m_view.hidden) {
+ if (visible == !m_view.hidden && (!isContentView() || visible == m_view.window.visible)) {
qCDebug(lcQpaWindow) << "No change in visible status. Ignoring.";
return;
}