summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/cocoa/qcocoawindow.mm
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2017-06-23 13:55:55 +0200
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2017-06-26 13:24:52 +0000
commit67ee72f3145fd14b36af408918ed3420504d3035 (patch)
tree240fe2ce373e3e9b9b5234a10a196dd00b501f36 /src/plugins/platforms/cocoa/qcocoawindow.mm
parentbb918db849e2650a961fea124be567df4aa3f19f (diff)
macOS: Merge QCocoaWindow::setWindowShadow into its only caller
Change-Id: I14149231d12658c59e3f9f87f2943ccdfbea4d43 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.mm13
1 files changed, 3 insertions, 10 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm
index 21fda31946..6c92751e9b 100644
--- a/src/plugins/platforms/cocoa/qcocoawindow.mm
+++ b/src/plugins/platforms/cocoa/qcocoawindow.mm
@@ -541,15 +541,6 @@ NSUInteger QCocoaWindow::windowStyleMask(Qt::WindowFlags flags)
return styleMask;
}
-void QCocoaWindow::setWindowShadow(Qt::WindowFlags flags)
-{
- if (!isContentView())
- return;
-
- bool keepShadow = !(flags & Qt::NoDropShadowWindowHint);
- m_view.window.hasShadow = keepShadow;
-}
-
void QCocoaWindow::setWindowZoomButton(Qt::WindowFlags flags)
{
if (!isContentView())
@@ -575,7 +566,9 @@ void QCocoaWindow::setWindowFlags(Qt::WindowFlags flags)
m_view.window.styleMask = windowStyleMask(flags);
m_inSetStyleMask = false;
m_view.window.level = this->windowLevel(flags);
- setWindowShadow(flags);
+
+ m_view.window.hasShadow = !(flags & Qt::NoDropShadowWindowHint);
+
if (!(flags & Qt::FramelessWindowHint))
setWindowTitle(window()->title());