summaryrefslogtreecommitdiff
path: root/src/plugins/platforms/wasm/qwasmintegration.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/platforms/wasm/qwasmintegration.cpp')
-rw-r--r--src/plugins/platforms/wasm/qwasmintegration.cpp17
1 files changed, 13 insertions, 4 deletions
diff --git a/src/plugins/platforms/wasm/qwasmintegration.cpp b/src/plugins/platforms/wasm/qwasmintegration.cpp
index a88de18f2a..2bdb3b7c69 100644
--- a/src/plugins/platforms/wasm/qwasmintegration.cpp
+++ b/src/plugins/platforms/wasm/qwasmintegration.cpp
@@ -10,7 +10,7 @@
#include "qwasmaccessibility.h"
#include "qwasmservices.h"
#include "qwasmoffscreensurface.h"
-
+#include "qwasmplatform.h"
#include "qwasmwindow.h"
#include "qwasmbackingstore.h"
#include "qwasmfontdatabase.h"
@@ -32,6 +32,8 @@
QT_BEGIN_NAMESPACE
+extern void qt_set_sequence_auto_mnemonic(bool);
+
using namespace emscripten;
using namespace Qt::StringLiterals;
@@ -81,6 +83,9 @@ QWasmIntegration::QWasmIntegration()
{
s_instance = this;
+ if (platform() == Platform::MacOS)
+ qt_set_sequence_auto_mnemonic(false);
+
touchPoints = emscripten::val::global("navigator")["maxTouchPoints"].as<int>();
// Create screens for container elements. Each container element will ultimately become a
@@ -226,10 +231,14 @@ QAbstractEventDispatcher *QWasmIntegration::createEventDispatcher() const
QVariant QWasmIntegration::styleHint(QPlatformIntegration::StyleHint hint) const
{
- if (hint == ShowIsFullScreen)
+ switch (hint) {
+ case ShowIsFullScreen:
return true;
-
- return QPlatformIntegration::styleHint(hint);
+ case UnderlineShortcut:
+ return platform() != Platform::MacOS;
+ default:
+ return QPlatformIntegration::styleHint(hint);
+ }
}
Qt::WindowState QWasmIntegration::defaultWindowState(Qt::WindowFlags flags) const