summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/wasm/qwasmwindow.cpp
diff options
context:
space:
mode:
authorMikolaj Boc <mikolaj.boc@qt.io>2023-01-27 15:01:34 +0100
committerMikolaj Boc <mikolaj.boc@qt.io>2023-02-14 19:01:17 +0100
commitda5dc2062576b75b6427fcc2bc74dc4fcfd9dcf5 (patch)
tree40c662bbbf5e916f84e6e14acb86932359b9caa7 /src/plugins/platforms/wasm/qwasmwindow.cpp
parent22fc1d08bb666bb91470ad3759b91256a56ef4fa (diff)
Transfer touch event handling to QWasmWindow
Fixes: QTBUG-103498 Change-Id: Iec8b5cfba75131e7ddf855e6b729291950888fd3 Reviewed-by: Lorn Potter <lorn.potter@gmail.com> Reviewed-by: Aleksandr Reviakin <aleksandr.reviakin@qt.io>
Diffstat (limited to 'src/plugins/platforms/wasm/qwasmwindow.cpp')
-rw-r--r--src/plugins/platforms/wasm/qwasmwindow.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/plugins/platforms/wasm/qwasmwindow.cpp b/src/plugins/platforms/wasm/qwasmwindow.cpp
index 36d289e96fe..1bc09ee2704 100644
--- a/src/plugins/platforms/wasm/qwasmwindow.cpp
+++ b/src/plugins/platforms/wasm/qwasmwindow.cpp
@@ -54,7 +54,7 @@ QWasmWindow::QWasmWindow(QWindow *w, QWasmDeadKeySupport *deadKeySupport,
m_nonClientArea = std::make_unique<NonClientArea>(this, m_qtWindow);
m_nonClientArea->titleBar()->setTitle(window()->title());
- m_clientArea = std::make_unique<ClientArea>(this, compositor->screen(), m_canvas);
+ m_clientArea = std::make_unique<ClientArea>(this, compositor->screen(), m_windowContents);
m_qtWindow.call<void>("appendChild", m_windowContents);
@@ -237,7 +237,7 @@ void QWasmWindow::setZOrder(int z)
void QWasmWindow::setWindowCursor(QByteArray cssCursorName)
{
- m_canvas["style"].set("cursor", emscripten::val(cssCursorName.constData()));
+ m_windowContents["style"].set("cursor", emscripten::val(cssCursorName.constData()));
}
void QWasmWindow::setGeometry(const QRect &rect)
@@ -576,7 +576,8 @@ void QWasmWindow::requestActivateWindow()
if (window()->isTopLevel())
raise();
- m_canvas.call<void>("focus");
+ if (!QWasmIntegration::get()->inputContext())
+ m_canvas.call<void>("focus");
QPlatformWindow::requestActivateWindow();
}