summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/cocoa/qnswindowdelegate.mm
diff options
context:
space:
mode:
authorAndy Shaw <andy.shaw@qt.io>2016-09-19 12:13:33 +0200
committerAndy Shaw <andy.shaw@qt.io>2016-10-19 15:48:39 +0000
commitcd081ca96a5387abe36f46a347363e07edcdcd67 (patch)
treeb436fd5371b7a4c03fe02ef19b2b2b1fd119f5cd /src/plugins/platforms/cocoa/qnswindowdelegate.mm
parentb38145a11d03c3e3fe8baf37800a017359283861 (diff)
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 <jake.petroules@qt.io>
Diffstat (limited to 'src/plugins/platforms/cocoa/qnswindowdelegate.mm')
-rw-r--r--src/plugins/platforms/cocoa/qnswindowdelegate.mm15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/plugins/platforms/cocoa/qnswindowdelegate.mm b/src/plugins/platforms/cocoa/qnswindowdelegate.mm
index 015274cac7..a26f381ddb 100644
--- a/src/plugins/platforms/cocoa/qnswindowdelegate.mm
+++ b/src/plugins/platforms/cocoa/qnswindowdelegate.mm
@@ -109,4 +109,19 @@
return YES;
}
+- (BOOL)window:(NSWindow *)window shouldPopUpDocumentPathMenu:(NSMenu *)menu
+{
+ Q_UNUSED(window);
+ Q_UNUSED(menu);
+ return m_cocoaWindow && m_cocoaWindow->m_hasWindowFilePath;
+}
+
+- (BOOL)window:(NSWindow *)window shouldDragDocumentWithEvent:(NSEvent *)event from:(NSPoint)dragImageLocation withPasteboard:(NSPasteboard *)pasteboard
+{
+ Q_UNUSED(window);
+ Q_UNUSED(event);
+ Q_UNUSED(dragImageLocation);
+ Q_UNUSED(pasteboard);
+ return m_cocoaWindow && m_cocoaWindow->m_hasWindowFilePath;
+}
@end