summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/cocoa/qcocoawindow.mm
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2021-09-15 14:38:22 +0200
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2021-09-15 17:49:35 +0200
commit65c9acc5f529689f609ebec5e6aae59a171982e4 (patch)
tree5134567195daa5a486f2a45fcbd2103f010c2f6e /src/plugins/platforms/cocoa/qcocoawindow.mm
parent1e5249bfa49c98116ad7743a89c77b594cfd38fa (diff)
macOS: remove the popup stack from QCocoaIntegration
Since popup handling is now done exclusively by Q(Gui)Application, we don't need to keep track of the popup stack in the Cocoa plugin anymore. Fixes: QTBUG-96450 Change-Id: I869f36f52bc2210b6c92efd9425502de4122c553 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src/plugins/platforms/cocoa/qcocoawindow.mm')
-rw-r--r--src/plugins/platforms/cocoa/qcocoawindow.mm16
1 files changed, 2 insertions, 14 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm
index 6a826b4d66..5ffc36a895 100644
--- a/src/plugins/platforms/cocoa/qcocoawindow.mm
+++ b/src/plugins/platforms/cocoa/qcocoawindow.mm
@@ -204,17 +204,13 @@ QCocoaWindow::~QCocoaWindow()
if (!isForeignWindow())
[[NSNotificationCenter defaultCenter] removeObserver:m_view];
- if (QCocoaIntegration *cocoaIntegration = QCocoaIntegration::instance()) {
- // While it is unlikely that this window will be in the popup stack
- // during deletetion we clear any pointers here to make sure.
- cocoaIntegration->popupWindowStack()->removeAll(this);
-
#if QT_CONFIG(vulkan)
+ if (QCocoaIntegration *cocoaIntegration = QCocoaIntegration::instance()) {
auto vulcanInstance = cocoaIntegration->getCocoaVulkanInstance();
if (vulcanInstance)
vulcanInstance->destroySurface(m_vulkanSurface);
-#endif
}
+#endif
[m_view release];
[m_nsWindow close];
@@ -336,11 +332,6 @@ void QCocoaWindow::setVisible(bool visible)
// so we can send the geometry change. FIXME: Get rid of this workaround.
handleGeometryChange();
- // Register popup windows. The Cocoa platform plugin will forward mouse events
- // to them and close them when needed.
- if (window()->type() == Qt::Popup || window()->type() == Qt::ToolTip)
- QCocoaIntegration::instance()->pushPopupWindow(this);
-
if (parentCocoaWindow) {
// The parent window might have moved while this window was hidden,
// update the window geometry if there is a parent.
@@ -449,9 +440,6 @@ void QCocoaWindow::setVisible(bool visible)
removeMonitor();
- if (window()->type() == Qt::Popup || window()->type() == Qt::ToolTip)
- QCocoaIntegration::instance()->popupWindowStack()->removeAll(this);
-
if (parentCocoaWindow && window()->type() == Qt::Popup) {
NSWindow *nativeParentWindow = parentCocoaWindow->nativeWindow();
if (m_resizableTransientParent