From 9b64bf0874b9e9323d6eadad2a8023c888f25182 Mon Sep 17 00:00:00 2001 From: Mikolaj Boc Date: Fri, 20 Jan 2023 15:12:38 +0100 Subject: Handle the drop event in the wasm window element MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Drop events are now handled in the wasm window element, which allows the browser to select the drop target automatically. This also fixes the case where drop data transfer finishes reading when a window has already been closed and destroyed - the cancellation flag is now owned by window so it gets invalidated as soon as window is gone. The code has also been structured with a new DragEvent passthrough. Fixes: QTBUG-109581 Change-Id: Ie3eb7446e2181fd540517f39397e8b35f111d009 Reviewed-by: MikoĊ‚aj Boc --- src/plugins/platforms/wasm/qwasmintegration.cpp | 6 ------ 1 file changed, 6 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 090218a118e..b92e4566686 100644 --- a/src/plugins/platforms/wasm/qwasmintegration.cpp +++ b/src/plugins/platforms/wasm/qwasmintegration.cpp @@ -80,12 +80,6 @@ QWasmIntegration::QWasmIntegration() m_clipboard(new QWasmClipboard), m_accessibility(new QWasmAccessibility) { - // Temporary measure to make dropEvent appear in the library. EMSCRIPTEN_KEEPALIVE does not - // work, nor does a Q_CONSTRUCTOR_FUNCTION in qwasmdrag.cpp. - volatile bool foolEmcc = false; - if (foolEmcc) - dropEvent(emscripten::val::undefined()); - s_instance = this; touchPoints = emscripten::val::global("navigator")["maxTouchPoints"].as(); -- cgit v1.2.3