aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/main.cpp8
-rw-r--r--src/qt/macoshelper.h1
-rw-r--r--src/qt/macoshelper.mm8
3 files changed, 17 insertions, 0 deletions
diff --git a/src/main/main.cpp b/src/main/main.cpp
index e3aca5e9..208ede89 100644
--- a/src/main/main.cpp
+++ b/src/main/main.cpp
@@ -72,6 +72,9 @@
#include "qt/KeysFiles.h"
#include "qt/MoneroSettings.h"
#include "qt/NetworkAccessBlockingFactory.h"
+#ifdef Q_OS_MAC
+#include "qt/macoshelper.h"
+#endif
// IOS exclusions
#ifndef Q_OS_IOS
@@ -133,6 +136,7 @@ Q_IMPORT_PLUGIN(QtQuickControls1Plugin)
Q_IMPORT_PLUGIN(QtQuick2DialogsPlugin)
Q_IMPORT_PLUGIN(QmlFolderListModelPlugin)
Q_IMPORT_PLUGIN(QmlSettingsPlugin)
+Q_IMPORT_PLUGIN(QtLabsPlatformPlugin)
Q_IMPORT_PLUGIN(QtQuick2DialogsPrivatePlugin)
Q_IMPORT_PLUGIN(QtQuick2PrivateWidgetsPlugin)
Q_IMPORT_PLUGIN(QtQuickControls2Plugin)
@@ -178,6 +182,10 @@ int main(int argc, char *argv[])
if(qgetenv("QMLSCENE_DEVICE") == "softwarecontext")
isOpenGL = false;
+#ifdef Q_OS_MAC
+ // macOS window tabbing is not supported
+ MacOSHelper::disableWindowTabbing();
+#endif
// disable "QApplication: invalid style override passed" warning
if (isDesktop) qputenv("QT_STYLE_OVERRIDE", "fusion");
#ifdef Q_OS_LINUX
diff --git a/src/qt/macoshelper.h b/src/qt/macoshelper.h
index c8e86b05..d3bd27b9 100644
--- a/src/qt/macoshelper.h
+++ b/src/qt/macoshelper.h
@@ -40,6 +40,7 @@ public:
static bool openFolderAndSelectItem(const QUrl &path);
static QPixmap screenshot();
static QString bundlePath();
+ static void disableWindowTabbing();
};
#endif //MACOSHELPER_H
diff --git a/src/qt/macoshelper.mm b/src/qt/macoshelper.mm
index 1d3b812a..35e42a32 100644
--- a/src/qt/macoshelper.mm
+++ b/src/qt/macoshelper.mm
@@ -41,6 +41,14 @@
#include "ScopeGuard.h"
+void MacOSHelper::disableWindowTabbing()
+{
+#ifdef __MAC_10_12
+ if ([NSWindow respondsToSelector:@selector(allowsAutomaticWindowTabbing)])
+ [NSWindow setAllowsAutomaticWindowTabbing: NO];
+#endif
+}
+
bool MacOSHelper::isCapsLock()
{
#ifdef __MAC_10_12