summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/wasm/qwasmwindow.cpp
Commit message (Collapse)AuthorAgeFilesLines
* wasm: Make sure typing with window focus does not produce charactersEven Oscar Andersen40 hours1-9/+14
|||||||||| contenteditable on the window caused characters to be inserted. Instead create a div as a child element, and set contenteditable on that. Fixes: QTBUG-136050 Change-Id: I4ccf3589ea19876f68bb9c7077c3a13ae5f989e6 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* wasm: fix clipboard event handler leaksMorten Sørvig5 days1-1/+5
||||||||||||| Use QWasmEventHandler instead of calling addEventListener() directly (using QWasmEventHandler also allows supporting JSPI). The QWasmEventHandler destructor calls removeEventListener(), which should make sure everything gets cleaned up. Keep the Chrome-specific global (document) event handler code path, but register once at startup instead of once per window. Change-Id: If4314df738afc0dcfdb0f6f1ab9e1f176e1812ac Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Allow configuring WASM without draganddropJuha Vuolle8 days1-0/+4
||||||| Pick-to: 6.9 6.8 Fixes: QTBUG-135874 Change-Id: I84459af06d34682ca3bed1e2e1dab773c77bbcae Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Allow configuring WASM without clipboardJuha Vuolle8 days1-1/+13
||||||| Pick-to: 6.9 6.8 Fixes: QTBUG-135875 Change-Id: Ibf0a51ff0e1268f32d32511dff64003c28137795 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* wasm: a11y - enable accessibility by environment variableEven Oscar Andersen2025-04-031-5/+9
|||||||| If QT_WASM_ENABLE_ACCESSIBILITY is set to "1" when the application starts, accessibility is enabled right away. Change-Id: I5b0118dc8ae19f446c64be33fe3c03b45c5b4527 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* wasm: Use the new QWasmEventHandler classMorten Sørvig2025-03-171-16/+16
||||||| Also saves one malloc call per event handler. Change-Id: I33a72916b101e27d2e4139ebb1dc5227b0793273 Reviewed-by: Lorn Potter <lorn.potter@qt.io>
* wasm: use QWasmWindow::fromWindow()Morten Sørvig2025-03-131-1/+3
||||||||| Make it test for null QWindow and handle(), use it instead of C-style casting handle(). Change-Id: I7ffb1ef5d3d3c09c8ae44ec0141e93530a04abe6 Reviewed-by: Even Oscar Andersen <even.oscar.andersen@qt.io> Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
* wasm: call focus on window if not editableEven Oscar Andersen2025-02-201-3/+8
||||||||||||| We used to call focus on the input element even for things like pushbuttons. This will display a keyboard on android, instead call focus on the focus window. Fixes: QTBUG-133781 Pick-to: 6.9 6.8 Change-Id: Ide4d6ec21a14f17b40d3d3de077c0ab073682f19 Reviewed-by: Lorn Potter <lorn.potter@qt.io>
* wasm: don't give native focus to non-focus windowsMorten Sørvig2025-01-291-1/+1
|||||||||||||| isActive() may return true if a (transient) parent window is active (has focus). Compare against QGuiApplication::focusWindow() instead. Fixes: QTBUG-129233 Pick-to: 6.8 6.9 Change-Id: I834a5814a5db161bdea2ba3524d1010e0c0e3e6e Reviewed-by: Even Oscar Andersen <even.oscar.andersen@qt.io> Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io> Reviewed-by: Lorn Potter <lorn.potter@qt.io>
* wasm: support foreign windowsMorten Sørvig2025-01-291-9/+32
||||||||||||||||||||||||||||||| Add support for embedding native html elements using QWindow::fromWinId(). WId is an emscripten::val *, e.g. a pointer to val which holds a html element. The element can be created either from C++ using emscripten::val, or from JavaScript. User code owns the val * as usual for WId; ownership is not passed to the QWindow instance. Set QWasmWindow::m_window to be the native element when fromWinId() is used, and skip the rest of the QWasmWindow implementation in that case: We don't need to install event handlers or provide accessibility elements. Make key and pointer event handlers stop propagation only if the event was not accepted. This makes sure that input events reach the embedded native element. Limit setPointerCapture calls to when the event is targeted for Qt elements only. Determining the true target can be a bit tricky when shadow DOM is in use since the browsers may retarget the event. Use composedPath() to get the true event target. Task-number: QTBUG-128804 Task-number: QTBUG-128732 Change-Id: I5ce66e93bacb06abfd042916687cd45fc9588c51 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* wasm: move qwasmwindowclientarea content to qwasmwindowMorten Sørvig2025-01-291-10/+188
|||||||||| This allows us to keep all event handlers in one place. Move event handler registration to registerEventHandlers(), which is called from the QWasmWindow constructor. Change-Id: I31f22d6eb876b92bb15d4a140e0569f0288a5915 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* wasm: streamline key eventsMorten Sørvig2025-01-291-10/+10
||||||||||||| Set the event type from the event handler instead of determining the event type at run-time based on string comparison. QWasmDeadKeySupport adds a complication. This can't be easily simplified or removed since it maintains state. Change-Id: Iad6f02ee7e2dc22817d7ac606514a2b4022f8fb0 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> Reviewed-by: Even Oscar Andersen <even.oscar.andersen@qt.io>
* wasm: streamline wheel eventsMorten Sørvig2024-12-041-1/+1
||||||||| Wheel events only have one type ("wheel"), which can be specified directly. Change-Id: Icd5adaf262bc4b5159fd1c38acd8041b7e4cda99 Reviewed-by: Even Oscar Andersen <even.oscar.andersen@qt.io> Reviewed-by: Lorn Potter <lorn.potter@qt.io>
* wasm: streamline pointer event handlingMorten Sørvig2024-12-041-5/+7
|||||||||||||||| We know the type of pointer event based on the callback (down, move, up, etc), which means the code which determines the type based on the type string can be removed. This saves one string comparison per event, and also allows removing the runtime error case where we are unable to determine which type of pointer event we have. Remove PointerEvent::fromWeb(), and construct the pointer event directly in the event handler instead. Change-Id: I4fe566bf076dddd5bf39217f1d6671ba07e25912 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* wasm: Fix focus handlingEven Oscar Andersen2024-11-261-0/+2
|||||||||||||||||| We had input handling enabled as a precondition for setting focus. This is wrong, we need to have the focus for toggle buttons and other non-input things as well. (Also toggle buttons act on spacebar). Also selects a new active window if the window that is active (i.e a dialog) is deleted. Also shift + tab did not always work, fixed to emit Key_Backtab Fixes: QTBUG-130371 Pick-to: 6.8 Change-Id: I3b36a3e200ba9d4b0791865e75235ddfb72bcaa5 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* wasm: handle isComposing for platforms that support itEven Oscar Andersen2024-11-211-28/+21
||||||||||||||||| Fixes (Alt + '~') + 'a' -> ã (Compose) + '\'' + e -> é A key change is to look at "isComposing" for events Related bugs: QTBUG-107139 QTBUG-124932 QTBUG-117096 Fixes: QTBUG-130887 Pick-to: 6.8 Change-Id: I0d4641d89952e0b4117226994a91e40039ad8a03 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* wasm: rename m_windowContents -> m_windowMorten Sørvig2024-10-221-20/+20
|||||||||| This element is the main window element and should have the simple name. Task-number: QTBUG-128732 Change-Id: Ia5e38d20468272e8102f516adc596bfdb37e28c4 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
* wasm: rename qt-window -> qt-decorated-windowMorten Sørvig2024-10-221-27/+27
||||||||| This is the parent element for the window decorations (title bar, resize handles), and also the window contents. Task-number: QTBUG-128732 Change-Id: I9ba814a7cf8477ab767278fe6548cd05e83266ca Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
* wasm: remove QWasmWindow::window() and m_windowMorten Sørvig2024-10-221-2/+1
|||||||||||| This shadows QPlatformWindow::window(), and we don't need it anyway. (also frees up the variable name for later use) Task-number: QTBUG-128732 Change-Id: Ie6e355b3136b106aed4b34cbe7f883008e1b3870 Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* wasm: move input event handlers to windowContentsMorten Sørvig2024-10-221-5/+5
||||||||| This html element should have all input event handling. Task-number: QTBUG-128732 Change-Id: I0da76ec410dad3165212ad5fc06f575acb07c3da Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* wasm: remove superfluous m_canvasContainerMorten Sørvig2024-10-221-10/+5
||||||||| Make the canvas and the a11y container element be children of m_windowContents instead. Task-number: QTBUG-128732 Change-Id: I6386eaa02a412888ae92beb8a74036b36b9b03db Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* wasm: don't set contentEditable on the canvasMorten Sørvig2024-10-221-7/+7
||||||||||| The canvas is aria-hidden, and should not take focus or handle events. Move this to the window contents element. Task-number: QTBUG-128732 Change-Id: I54453d067570b9e2c9db9c7293f267f4cfc0aacd Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* wasm: rename canvas CSS class to qt-window-canvasMorten Sørvig2024-10-221-1/+1
|||||||||| qt-window-content is a bit too generic; the window has other content besides the canvas, like the accessibility elements. Task-number: QTBUG-128732 Change-Id: I9e0ff4393fb8425769e7cfe8618603d87f47b7ab Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* wasm: add input context composition WA for ibusInho Lee2024-09-121-1/+1
||||||||||| With IBUS, compositions are processed with "Dead" key. It is supposed to be processed with input context, so window's key event will be skipped. Fixes: QTBUG-117096 Pick-to: 6.8 6.7 Change-Id: I179d32d656bd38990de4b656757957e26935376f Reviewed-by: Lorn Potter <lorn.potter@qt.io>
* wasm: simplify QWasmWindow constructorMorten Sørvig2024-09-031-86/+87
||||||||||||||| The code implements parts of the event handling as lambdas in the constructor. This makes it hard to see what the constructor code itself does. Instead, move the initial handling of the emscripten::val event to event handler functions, which then call the existing process event functions. Pick-to: 6.8 Change-Id: I3abc5be47b080c772c699c21f2fe1cc555ff8192 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io> Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
* wasm: Re-evaluate window flags when reparenting windowTor Arne Vestbø2024-08-091-0/+4
|||||||||||||||| We apply CSS classes to the qt-window in setWindowFlags based on whether it hasFrame(), hasBorder(), etc. Which in turn depends on whether the window is a top level or child window. As a QPlatformWindow may be created while a QWindow is top level, and then reparented into another QPlatformWindow, we need to update the window flags, and re-sync the CSS classes, as otherwise we end up with child windows with shadows and tile bars. Pick-to: 6.8 Change-Id: Ibbb3d2230a880057053d7b12f93257d9b250aa6f Reviewed-by: Lorn Potter <lorn.potter@gmail.com> Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
* wasm: Revamp QWasmInputContextInho Lee2024-07-051-12/+92
|||||||||||||||||||||||| 1. Use QWasmInputContext by default 2. Use QInputMethodEvent instead of KeyEvent Todo: 1. Platform dependent preedit control especially when cursor moved with preedit. (Tested on Android, Linux, Windows) (Firefox still has a problem but it's not clear why PointerEvent doesn't happen.) 2. Apply existing text to inputMethodQueries. 3. Test on touchscreen devices. 4. Test on IOS devices. 5. When dragging selection, freezing 6. Support context menu Fixes: QTBUG-107139 Fixes: QTBUG-124932 Fixes: QTBUG-117096 Pick-to: 6.7 6.8 Change-Id: Iceb6af3489b3d1195ad58cf8f3deb91275fd1bf4 Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* wasm: Change window flags for toplevel windowsEven Oscar Andersen2024-07-041-0/+19
||||||||||||||| The window system menu, and title, was missing from toplevel qml windows. The fix is to modify the toplevel windowflags for: Qt::Window, Qt::Dialog, Qt::Tool and Qt::SplashScreen The test for this is to run the: qtdeclarative/examples/quick/window/ example Fixes: QTBUG-126335 Change-Id: I2f11ecf6daa38e4963dca540d10eda301d66ff9d Reviewed-by: Lorn Potter <lorn.potter@gmail.com> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* wasm: Fix handling of native windowsEven Oscar Andersen2024-06-131-5/+5
||||||||||||||| There are two problems 1) internal (not toplevel) windows needs to have the frameLess attribute set. Without this attribute the window is not visible 2) The backingstore needs to use the correct window, if not the symptoms are that the display is not always correctly updated. Seen in the qtdoc/examples/demos/documentviewer demo Fixes: QTBUG-125856 Change-Id: I040d963c0c130214cc70a607090faa006c02f981 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Wasm: fix QtVirtualKeyboard crashLorn Potter2024-06-021-3/+2
||||||||||| Do not try to access non the existent input element when there is no touchscreen, as we do not use it in that instance. Fixes: QTBUG-125120 Pick-to: 6.7 6.7.1 Change-Id: Iedac1890d13b348ef12690947779347e3c2f8476 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
* wasm: add autorepeat for QKeyEventLorn Potter2024-05-231-1/+1
||||||||| We weren't handling it at all, emscripten already supports it. Fixes: QTBUG-125222 Pick-to: 6.7 Change-Id: I761eed2c8c034604cd02ba436db68cec4fdeb784 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* wasm: Fix minimum and default window sizesPiotr Wierciński2024-03-191-18/+3
||||||||| Remove minimum window size restriction. User should be able to change minimum window size if needed. Set default size to 160x160 to match other platforms. Change-Id: Ic199fc34982021ba38d631476fbb1c51370b2e8e Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* wasm: move keyboard input handling for touchscreensLorn Potter2024-01-091-2/+13
|||||||||| It's better served where all keys are handled, and fixes bug with modifier keys Fixes: QTBUG-118503 Pick-to: 6.6 6.7 Change-Id: Ic53d1b332bd918dbc4fdd27ea4e43ad1e1ecce82 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* wasm: Handle stylus events by generating QTabletEventsShawn Rutledge2023-12-281-1/+1
||||||| Pick-to: 6.6 6.7 Fixes: QTBUG-120327 Change-Id: I37a92b9850385712b638c30f9a43028d8134f416 Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* wasm: add QWasmDrag back to handle drag/dropLorn Potter2023-12-211-23/+5
||||||| Change-Id: I7c577e6b13db9f5c51e5691baaf6417b956a5ff4 Done-with: Mikolaj.Boc@qt.io Pick-to: 6.7 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* wasm: move DataTransfer to dom::Lorn Potter2023-12-211-20/+13
|||||| Change-Id: I069292154bafd1c08a0d0f2e8a62052f596a80f3 Done-with: Mikolaj.Boc@qt.io Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* wasm: add QWindow parameter to DragEventLorn Potter2023-12-201-4/+4
||||||||| Perparing for enhanced Darg Drop support Done-with: Mikolaj.Boc@qt.io Change-Id: I24ce72570ce0754c8a5c152a92192eebeae5b340 Pick-to: 6.7 Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* wasm: prevent native mobile keyboard from popping up alwaysLorn Potter2023-12-081-2/+4
||||||||||||| also fix misspelled 'inputMode' which seems to work. we need to re focus to the canvas when window is raised which will automagically close the native keyboard when user clicks on non edit area. Fixes: QTBUG-101404 Pick-to: 6.6 6.5 Change-Id: Iced9abc7b23e079b1060d2474a139aa653a8ca01 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
* wasm: Respect maximum window size in QWasmWindowPiotr Wierciński2023-11-201-6/+2
||||||||||||| Currently we are only checking if windowMinimumSize is not violated, and we dont check windowMaximumSize at all, which may results in windows being bigger than they ought to be. When the sizeHints are updated, call the setGeometry() function which makes sure that size constraints are respected and will resize window if needed. Pick-to: 6.5 6.6 Change-Id: I703bddec85ba6e02eea74a39e06d1f70d59e1677 Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* wasm: Apply window mask during QWasmWindow initializationTor Arne Vestbø2023-08-151-0/+3
|||||||||||| We need to apply properties of the QWindow the underlying "native window", in this case our <div>, on construction, without waiting for the user to call one of the QWindow setters. Pick-to: 6.6 Change-Id: Id422a9424f584e2269ef333e2c7c88a123ecb70b Reviewed-by: Mikołaj Boc <Mikolaj.Boc@qt.io> Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* wasm: Don't add window border, title bar, etc, to child windowsTor Arne Vestbø2023-08-151-1/+1
|||||||||| Only top level windows should have window manager features, to match other platforms. Pick-to: 6.6 Change-Id: I7a0563ef34aeb430d0b1a16633a5626482ccd17d Reviewed-by: Mikołaj Boc <Mikolaj.Boc@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* wasm: Don't clamp y position of child QWindows to parent rectTor Arne Vestbø2023-08-151-1/+4
|||||||||||||||| A child window should be possible to place at arbitrary positions within its parent, even outside the parent's current rect. Once the parent size is changed, the child might become visible. The current code also caused issues when the parent did not have a size yet (0x0) at the time of the child's setGeometry call, resulting in the child always being placed at y=0. Pick-to: 6.6 Change-Id: I1534b606ab6eb7d51216d3b305a1b60443c41ec2 Reviewed-by: Mikołaj Boc <Mikolaj.Boc@qt.io> Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
* Fix link to platform window in QAndroidPlatformBackingStore::flush()Axel Spoerl2023-08-041-8/+0
||||||||||||||||||||||||||||||||||||||| The Android QPA implementation requires a 1:1 link between a platform window and a platform backing store, to correctly flush a backing store to the screen. QAndroidPlatformBackingStore has a bool member m_backingStoreSet, to remember if this link exists. It defaults to false and is set to true, when setBackingStore() is called in the constructor. It falsely remains true, when a platform window is deleted, e.g. because a QWindow has been hidden. When the QWindow is shown again, a new Android platform window is created. With m_backingStoreSet still being true, this new platform window will never be associated with a backing store. As a consequence, it will never be displayed on the screen. The 1:1 relationship of an Android platform window and an Android backing store is neither ideal, nor in line with other QPA layers (e.g. XCB). Changing the Android QPA implementation is complex and a short term fix is necessary. This patch removes the member m_backingStoreSet. Instead of it, QAndroidPlatformBackingStore::flush() directly checks, if the platform window corresponding to the QWindow argument is associated to a backing store. If that is not the case, setBackingStore() is called. QTBUG-97482 has been fixed with another approach, which this patch reverts. The following commits are effectively reverted by this patch: 9a39ad8dfb4e6d1a179bd0fa38026886f8f7cb8e f91588923b1e7b68f1bd79b38af44d024df85996 a4ca9e80658bca7dad1529f03c1b59173a6ecf62 dbb072eb2838a04e89e34dad686394a496d5de87 959a8b3967ac3b6315f5b458628ec5661dfc367e Fixes: QTBUG-97482 Pick-to: 6.6 6.5 6.2 Change-Id: Ic4344f8df2e954c057dd2705340f11dfd2d4c6fe Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* wasm: Render Qt::SubWindow borderlessPiotr Wierciński2023-07-171-5/+14
||||||||| Windows with Qt::SubWindow flag should not have platform decoration. Fixes: QTBUG-115054 Pick-to: 6.5 6.6 Change-Id: I7111df6057a087080194c1d46e350df839bec437 Reviewed-by: Lorn Potter <lorn.potter@gmail.com>
* Adapt setBackingStore() overrides in QWasmWindow and QEglFSWindowAxel Spoerl2023-07-161-0/+8
||||||||||| This is a follow up to a4ca9e80658bca7dad1529f03c1b59173a6ecf62, adapting the backing store setters to become proper overrides of the newly implemented QPlatformWindow::setBackingStore(); Pick-to: 6.6 Change-Id: Id4f5ff8650ca4e4d3cab1d71d27041c6129bf4ea Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
* WASM: don't ignore custom QSurfaceFormat settingsYuhang Zhao2023-06-221-0/+5
|||||||||||||| Previously, Qt would always ignore user's custom QSurfaceFormat settings and this behavior makes user have no way to control the preferred OpenGL version when running on WASM. And after reading the wasm platform plugin code, I don't see any reason why we should limit ourself to the default OpenGL version. And I've tested this patch locally, Qt still work normally if I set a newer OpenGL version. Pick-to: 6.6 6.5 Change-Id: I0cfb831d6a722fe61cc85808a6d9e3098c73d82e Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io> Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
* Add keyboard input testcase to the QWasmWindow testMikolaj Boc2023-06-201-0/+1
||||||||||||| The test checks whether correct windows get correct keyboard input, having been activated with mouse clicks. Also fixes the event propagation error found. Key events would propagate to parent windows, which is something that should not happen with window managers. Change-Id: I18bae8c14cce5ccae151c2a00c84ffdba3b4587f Reviewed-by: Mikołaj Boc <Mikolaj.Boc@qt.io> Reviewed-by: Piotr Wierciński <piotr.wiercinski@qt.io>
* Support child windows on WASMMikolaj Boc2023-06-151-31/+83
|||||||||||||| Setting parents for WASM platform windows is now supported. This means that windows now reside in a hierarchical window tree, with the screen and individual windows being nodes (QWasmWindowTreeNode), each maintaining their own child window stack. The divs backing windows are properly reparented in response to Qt window parent changes, so that the html structure reflects what is happening in Qt. Change-Id: I55c91d90caf58714342dcd747043967ebfdf96bb Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* Correctly focus WASM windows on showMikolaj Boc2023-06-091-0/+2
||||||||||| Since first requestActivate may happen before the window div is actually displayed on-screen, we need to sync Qt's activation state with DOM as soon as DOM element becomes visible. Focusing an invisible element is impossible. Fixes: QTBUG-79934 Change-Id: I04cf9b4ead006c9b8b135b3b6967d7938c581833 Reviewed-by: Morten Johan Sørvig <morten.sorvig@qt.io>
* wasm: build with -no-feature-accessibilityMorten Sørvig2023-05-021-0/+4
||||||||| Add #ifdefs around the accessibility implementation. Fixes: QTBUG-111509 Pick-to: 6.5 Change-Id: I9a600781b4bf9545f046efa75f962cc40fe196a6 Reviewed-by: Mikołaj Boc <Mikolaj.Boc@qt.io>
close