summaryrefslogtreecommitdiff
path: root/src/plugins/platforms/cocoa/qcocoawindow.mm
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/platforms/cocoa/qcocoawindow.mm')
-rw-r--r--src/plugins/platforms/cocoa/qcocoawindow.mm16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm
index c8ef967f20..19c4faf369 100644
--- a/src/plugins/platforms/cocoa/qcocoawindow.mm
+++ b/src/plugins/platforms/cocoa/qcocoawindow.mm
@@ -253,6 +253,11 @@ QCocoaWindow::~QCocoaWindow()
[m_nsWindowDelegate release];
}
+QSurfaceFormat QCocoaWindow::format() const
+{
+ return window()->requestedFormat();
+}
+
void QCocoaWindow::setGeometry(const QRect &rect)
{
if (geometry() == rect)
@@ -481,7 +486,7 @@ void QCocoaWindow::setWindowFlags(Qt::WindowFlags flags)
void QCocoaWindow::setWindowState(Qt::WindowState state)
{
- if ([m_nsWindow isVisible])
+ if (window()->isVisible())
syncWindowState(state); // Window state set for hidden windows take effect when show() is called.
}
@@ -720,6 +725,12 @@ bool QCocoaWindow::windowShouldClose()
return accepted;
}
+void QCocoaWindow::setSynchedWindowStateFromWindow()
+{
+ if (QWindow *w = window())
+ m_synchedWindowState = w->windowState();
+}
+
bool QCocoaWindow::windowIsPopupType(Qt::WindowType type) const
{
if (type == Qt::Widget)
@@ -818,6 +829,9 @@ NSWindow * QCocoaWindow::createNSWindow()
if (QSysInfo::QSysInfo::MacintoshVersion >= QSysInfo::MV_10_7) {
// Make popup winows show on the same desktop as the parent full-screen window.
[window setCollectionBehavior:NSWindowCollectionBehaviorFullScreenAuxiliary];
+
+ if ((type & Qt::Popup) == Qt::Popup)
+ [window setAnimationBehavior:NSWindowAnimationBehaviorUtilityWindow];
}
#endif
window->m_cocoaPlatformWindow = this;