From cd081ca96a5387abe36f46a347363e07edcdcd67 Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Mon, 19 Sep 2016 12:13:33 +0200 Subject: macOS: Only show menu and allow dragging on proxy when a file path is set If there is no file path set then it should not be possible to see a menu or to drag from a proxy icon in the titlebar. Task-number: QTBUG-56082 Change-Id: Ib8305bcab5717bc8cb7ddabbb079f152debbdded Reviewed-by: Jake Petroules --- src/plugins/platforms/cocoa/qcocoawindow.mm | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/plugins/platforms/cocoa/qcocoawindow.mm') diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm index c0d5904367..977a5ae657 100644 --- a/src/plugins/platforms/cocoa/qcocoawindow.mm +++ b/src/plugins/platforms/cocoa/qcocoawindow.mm @@ -379,6 +379,7 @@ QCocoaWindow::QCocoaWindow(QWindow *tlw) , m_topContentBorderThickness(0) , m_bottomContentBorderThickness(0) , m_normalGeometry(QRect(0,0,-1,-1)) + , m_hasWindowFilePath(false) { #ifdef QT_COCOA_ENABLE_WINDOW_DEBUG qDebug() << "QCocoaWindow::QCocoaWindow" << this; @@ -941,6 +942,7 @@ void QCocoaWindow::setWindowFilePath(const QString &filePath) QFileInfo fi(filePath); [m_nsWindow setRepresentedFilename: fi.exists() ? QCFString::toNSString(filePath) : @""]; + m_hasWindowFilePath = fi.exists(); } void QCocoaWindow::setWindowIcon(const QIcon &icon) -- cgit v1.2.3