From d141d6894960dba7c62d67400a31a49a4abcdb08 Mon Sep 17 00:00:00 2001 From: Mikolaj Boc Date: Tue, 24 Jan 2023 10:18:34 +0100 Subject: Transfer the key handling logic to QWasmWindow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Also, use the embind approach as the rest of the events do, and introduce a KeyEvent class which simplifies and streamlines event support. The event translator has been given a more specific function of just handling the dead keys. Rest of the translation functionality is coded directly in KeyEvent for more encapsulation. Change-Id: I11b0262fc42fe920206ecc6de0d434b9d9ab9998 Reviewed-by: Morten Johan Sørvig --- src/plugins/platforms/wasm/qwasmintegration.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/plugins/platforms/wasm/qwasmintegration.cpp') diff --git a/src/plugins/platforms/wasm/qwasmintegration.cpp b/src/plugins/platforms/wasm/qwasmintegration.cpp index 1487fb3f88d..a88de18f2a2 100644 --- a/src/plugins/platforms/wasm/qwasmintegration.cpp +++ b/src/plugins/platforms/wasm/qwasmintegration.cpp @@ -2,7 +2,6 @@ // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only #include "qwasmintegration.h" -#include "qwasmeventtranslator.h" #include "qwasmeventdispatcher.h" #include "qwasmcompositor.h" #include "qwasmopenglcontext.h" @@ -164,8 +163,10 @@ bool QWasmIntegration::hasCapability(QPlatformIntegration::Capability cap) const QPlatformWindow *QWasmIntegration::createPlatformWindow(QWindow *window) const { - QWasmCompositor *compositor = QWasmScreen::get(window->screen())->compositor(); - return new QWasmWindow(window, compositor, m_backingStores.value(window)); + auto *wasmScreen = QWasmScreen::get(window->screen()); + QWasmCompositor *compositor = wasmScreen->compositor(); + return new QWasmWindow(window, wasmScreen->deadKeySupport(), compositor, + m_backingStores.value(window)); } QPlatformBackingStore *QWasmIntegration::createPlatformBackingStore(QWindow *window) const -- cgit v1.2.3