| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Windows with a transient parent does not reflect the relationship
in the stacking order. Essentially AboveTransientParent is missing
as a configuration choice.
What makes this slightly convoluted is that the window stack
does not depend on the window (for testability).
We solve this problem by making the stack and treenode templates,
and provide test class as arguments when testing.
QWasmWindow and QWasmScreen are not templated as before.
There is also a new order type StayAboveTransientParent. Which
means that we can no longer use order type to get to the
group location (Since StayAboveTransientParent can map to either
of the three types).
The window stack tests have been updated to handle the
StayAboveTransientParent type.
Finally, we do not do anything with a normal parent
child relationship as this should already work
correctly.
Fixes: QTBUG-131699
Change-Id: Ie08e18f9e0a2339175c4a09da0a831f031df71e1
Reviewed-by: Lorn Potter <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Setting focus and contentEditable on m_window causes
innerHTML to build up with characters.
This does not happen when using the m_canvas
The downside is that m_canvas is aria-hidden, but this
should, in principle, not be a problem since
m_canvas should not be focused when a11y is in
effect.
Later aria-hidden might be set only if a11y is in
effect.
This is a candidate for manual cherry-picking to
6.9 6.9.1
Task-number: QTBUG-136687
Change-Id: I08a9db2c39f9b0b0038c75fd06d3504b736ea031
Reviewed-by: Morten Johan Sørvig <[email protected]>
|
|
|
|
|
|
|
|
|
|
| |
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 <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 <[email protected]>
|
|
|
|
|
|
|
|
| |
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 <[email protected]>
|
|
|
|
|
|
|
| |
Also saves one malloc call per event handler.
Change-Id: I33a72916b101e27d2e4139ebb1dc5227b0793273
Reviewed-by: Lorn Potter <[email protected]>
|
|
|
|
|
|
|
|
|
| |
Make it test for null QWindow and handle(), use it
instead of C-style casting handle().
Change-Id: I7ffb1ef5d3d3c09c8ae44ec0141e93530a04abe6
Reviewed-by: Even Oscar Andersen <[email protected]>
Reviewed-by: Piotr Wierciński <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 <[email protected]>
|
|
|
|
|
|
|
|
|
|
| |
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 <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 <[email protected]>
Reviewed-by: Even Oscar Andersen <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 <[email protected]>
|
|
|
|
|
|
|
|
|
|
| |
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ø <[email protected]>
Reviewed-by: Piotr Wierciński <[email protected]>
|
|
|
|
|
|
|
|
|
| |
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 <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 <[email protected]>
Reviewed-by: Tor Arne Vestbø <[email protected]>
|
|
|
|
|
|
|
|
|
| |
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ø <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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ø <[email protected]>
Reviewed-by: Piotr Wierciński <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 <[email protected]>
|
|
|
|
|
|
|
|
|
| |
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ø <[email protected]>
|
|
|
|
|
|
|
| |
Change-Id: I7c577e6b13db9f5c51e5691baaf6417b956a5ff4
Done-with: [email protected]
Pick-to: 6.7
Reviewed-by: Morten Johan Sørvig <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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ø <[email protected]>
|
|
|
|
|
|
|
|
|
| |
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 <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
| |
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 <[email protected]>
Reviewed-by: Shawn Rutledge <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 <[email protected]>
Reviewed-by: Tor Arne Vestbø <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
| |
Expose document and clientArea emscripten objects through
NativeInterface.
This is required by WebView implementation for wasm platform.
Task-number: QTBUG-75183
Change-Id: I6f2f084a9dbceb80d2186c7395c008f268a91e39
Reviewed-by: Tor Arne Vestbø <[email protected]>
Reviewed-by: Mikołaj Boc <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently we render shadow and default background-color even for
frameless windows with transparent content.
This behavior is not consistent comparing to other platforms.
An example of such window is InputSelectionHandle from
VirtualKeyboard module.
This commit disables shadow-box and provides transparent
background-color for QWasmWindow which are frameless.
It also provides distinction between "frame" as logic property
of window and "border" as visual decoration.
Change-Id: I902692ea561a2e88e2e6ab7faad8e3eeb536a26b
Reviewed-by: Aleksandr Reviakin <[email protected]>
Reviewed-by: Mikołaj Boc <[email protected]>
|
|
|
|
|
|
|
| |
Add support for QPlatformWindow::setOpacity() in QWasmWindow.
Change-Id: Ib54cecf1f49e3d576a386f4109b8c6df1f16f312
Reviewed-by: Mikołaj Boc <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
| |
Minimum size of QWasmWindow was not properly enforced.
Make sure that minimumu size constraints are respected
when the QWasmWindow is created, resized manually or
changed by setGeometry().
Fixes: QTBUG-111162
Change-Id: I2984b0836b5b53f9163275153d734cb1d81ef3b6
Reviewed-by: Mikołaj Boc <[email protected]>
|
|
|
|
|
|
|
| |
Fixes: QTBUG-103498
Change-Id: Iec8b5cfba75131e7ddf855e6b729291950888fd3
Reviewed-by: Lorn Potter <[email protected]>
Reviewed-by: Aleksandr Reviakin <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 <[email protected]>
|
|
|
|
|
|
|
|
|
| |
WindowTitleHint now correctly enables/disables the window title, and
FramelessWindowHint correctly enables/disables the window frame.
Change-Id: I6f98f0a53af828606748308c6b5bd5d492cef9d2
Reviewed-by: Aleksandr Reviakin <[email protected]>
Reviewed-by: Morten Johan Sørvig <[email protected]>
|
|
|
|
|
|
| |
Change-Id: I1089ab4706c4342fa5976b1aff18d67d47769687
Reviewed-by: Aleksandr Reviakin <[email protected]>
Reviewed-by: Morten Johan Sørvig <[email protected]>
|
|
|
|
|
|
|
|
|
|
| |
QWasmWindow is now implementing the setMask method, which translates
the received QRegion to a css clip path
Fixes: QTBUG-73260
Change-Id: Ie934c1e6ab650426bfc32154bf9e49a4a2aeb45b
Reviewed-by: Aleksandr Reviakin <[email protected]>
Reviewed-by: Morten Johan Sørvig <[email protected]>
|
|
|
|
|
| |
Change-Id: Ife43bb8d10b0d89f8364b5e2b4dd5349a7ad1110
Reviewed-by: Morten Johan Sørvig <[email protected]>
|
|
|
|
|
|
|
| |
Also, trim QWasmCursor as some of it was dead code.
Change-Id: If6fee3390e4c2a2c66ceaef5917d7387f8dbd46c
Reviewed-by: Morten Johan Sørvig <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
| |
Align the wheel event handling with other events - move the handler to
wasm window and create a C++ wrapper class for the js wheel event.
Fixes: QTBUG-109622
Change-Id: I915e502de7c0784ec9a6745a90ddcda062e91b2b
Reviewed-by: Mikołaj Boc <[email protected]>
Reviewed-by: Lorn Potter <[email protected]>
Reviewed-by: Morten Johan Sørvig <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 <[email protected]>
|
|
|
|
|
|
|
|
|
|
| |
Add accessibility (a11y) container QWasmWindow. This
container should underlap the canvas with identical
geometry but ordered below.
Pick-to: 6.5
Change-Id: I7b91e3e69e3b1afa1b03ef7f7b7336e48f1a1594
Reviewed-by: Morten Johan Sørvig <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It is now not the screen that handles all of the events and relays
them to individual windows, but the window elements themselves.
This allows us to get rid of manual window targeting logic and let
the browser do its job.
Fixes: QTBUG-107217
Pick-to: 6.5
Change-Id: I4dc5a74b1343f027f72c1da4623b99cd28bfbb38
Reviewed-by: Morten Johan Sørvig <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The compositor is redundant in the process of moving the window.
Have the title bar react to move all by itself.
Additionally, a clearer structure in the window was introduced.
The non-client area has been extracted into a separate class, as
was the icon store and free DOM functions used across files.
Since it was now easy, made the window maximize/restore on double click
on the title element.
Fixes: QTBUG-107626
Pick-to: 6.5
Change-Id: Iba7f207e46806ae7162656965892ae5a48ac5ebe
Reviewed-by: Morten Johan Sørvig <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Introducing a div outline which handles the resize events by itself.
Manual computations in wasm compositor are no longer needed.
The outline reacts to setting css variables (border-width,
resize-outline-width), it sets the correct cursors using css and
always keeps the correct size.
Fixes: QTBUG-107498
Change-Id: I6b0564632af5e17e464fe93a3dfa20820c624292
Reviewed-by: Morten Johan Sørvig <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Make the browser compositor draw the window non-client area (using css
+ html). Get rid of OpenGL usage in non-OpenGL windows and use canvas
2d context instead to blit the texture (QImage).
Also, as part of the change, remove the deprecated canvas element support
in QScreen.
Fixes: QTBUG-107116
Fixes: QTBUG-107219
Change-Id: I65f0d91831c806315685ca681ac0e416673f5cd5
Reviewed-by: Morten Johan Sørvig <[email protected]>
Reviewed-by: Aleksandr Reviakin <[email protected]>
Reviewed-by: David Skoland <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
| |
Using two different resizing techniques (one in QSizeGrip, one in
QWasmCompositor) leads to strange behavior while resizing wasm windows.
Redirect the QSizeGrip's resize to wasm's compositor resize (which might
be considered system resize) to avoid that.
Change-Id: Idfc062643caac3ceee879bfb875d943aade28378
Reviewed-by: David Skoland <[email protected]>
Reviewed-by: Morten Johan Sørvig <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The existing code did not take into account that some of the controls
might be missing. Clicking on the window frame, just to the right of
the close button, would then maximize a window, even though this was
not the desired behavior.
Also, simplified most of the checks for existence of controls as
different idioms were used, which were equivalent. Now, all visibility
is computed at the makeTitleBarOptions stage and a single idiom of
tb.subControls.testFlag is used for checking control visibility.
Pick-to: 6.4
Change-Id: I5a94f20fbf527243ff1ae5e6886688d2dd793a6c
Reviewed-by: Morten Johan Sørvig <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes dock widget undocking - previously, without the capture, any
widget that the mouse accidentally entered would get the event,
resulting in re-docking problems, cursor issues etc.
Fixes: QTBUG-105621
Pick-to: 6.4
Change-Id: Ia1f2c91578018f2ae9df903bc0730200ede17d32
Reviewed-by: Lorn Potter <[email protected]>
|
|
|
|
|
|
|
|
|
| |
Minimizing windows is not supported on Wasm. The button has also never
been drawn, so remove the code that supports its hit test.
Change-Id: Ic1c26f1036aa9c7d65c8c61b7fd47ecce32889ca
Pick-to: 6.4
Reviewed-by: Morten Johan Sørvig <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
| |
The title bar drawing routines belong in QWasmWindow, not in the
compositor. This provides better encapsulation as many properties
don't have to be leaked from QWasmWindow. Extensibility will also
improve.
Change-Id: If73dd4e87602f62bff0de92e1405f89e7a9f3b43
Pick-to: 6.4
Reviewed-by: Morten Johan Sørvig <[email protected]>
|
|
|
|
|
|
|
|
| |
The types essentially do the same job - the one that is more general
should be used, the other - removed, as it is redundant.
Change-Id: Iec09d3311681abce1405fcf8c2cebfb72f3fd51c
Reviewed-by: Lorn Potter <[email protected]>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Replace the current license disclaimer in files by
a SPDX-License-Identifier.
Files that have to be modified by hand are modified.
License files are organized under LICENSES directory.
Task-number: QTBUG-67283
Change-Id: Id880c92784c40f3bbde861c0d93f58151c18b9f1
Reviewed-by: Qt CI Bot <[email protected]>
Reviewed-by: Lars Knoll <[email protected]>
Reviewed-by: Jörg Bornemann <[email protected]>
|