| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
| |
This is an example similar to minimal-cpp, but for xdg-shell instead of
ivi-application. Eventually it should replace qwindow-compositor as the
main c++-only example compositor.
Task-number: QTBUG-69937
Change-Id: Icac70e4af8f97c5f628d7e30279249210772a1c1
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
|
|
|
|
|
|
|
|
| |
Adds a test for customSurface which crashed without the fix.
Fixes: QTBUG-72688
Change-Id: I30c50e474379c61b90b2dd294eae9a7c88c105a2
Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
|
|
|
|
|
|
|
| |
This patch amends d25b3b7f1059d5561bce3efe7ea903ea76d4e888
Change-Id: I413818f6cd4a77062287265f3bcb5db6170fc4d2
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
|
|
|
|
|
|
| |
Fixes: QTBUG-72288
Change-Id: I61fde92ea4275febbb4ec8c067280a4ca570d7c1
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
|
|
|
|
|
|
|
|
|
| |
The xkbcommon configure logic was refactored in
qtbase/c3a963da1f9e7b1d37e63eedded61da4fbdaaf9a.
For more details see the relevant commit.
Change-Id: Ic1aa26846ab8266c589f6e92dc8b81aba36df58a
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
|
|
|
|
|
|
|
|
| |
Only send expose event when the geometry actually changed.
Change-Id: Ic06986ce5d11e0ff7a842303f57093b8ff25b9f6
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Reviewed-by: David Edmundson <davidedmundson@kde.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
QBackingStore::flush is sometimes called with an unxeposed window, in that
case, don't attach the buffer to the wl_surface immediately, as that causes
protocol errors with xdg_shell.
Flushed buffers are instead stored until we get the first configure event.
[ChangeLog][QPA plugin][xdg-shell] Fixed a bug where buffers were sometimes
attached and committed before the first configure event, causing protocol
errors.
Fixes: QTBUG-71345
Change-Id: If9409d97bd25f6b13940c56141920a664c349c8e
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Reviewed-by: David Edmundson <davidedmundson@kde.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
[ChangeLog][Compositor] Fixed a bug where some signals on QWaylandSurface were
emitted before all double buffered state had been applied.
Restructures QWaylandSurface::commit so no signals are emitted until all state
mutations are completed.
Adds a test to confirm that pending state is applied at once.
Also fixes opaqueRegion, which is documented to be double buffered as well, but
the old implementation set it immediately.
Change-Id: I1c4dfea7c83dd9ee84dc8c03e6d92e2924bf2fad
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
|
|
|
|
|
| |
Change-Id: Iddcf6cbddd74dc41d8c14b1da06f7e320de774b4
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
|
|
|
|
|
| |
Change-Id: I9b110647c054c897fa2a6d6fc6f392c981845f09
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
|
|
|
|
|
|
|
|
|
| |
When we switch to only including core wayland headers, wl_resource will be an
opaque type. Use the getters and setter functions instead.
Task-number: QTBUG-70553
Change-Id: I7d84d48a4ee3586f231a331cd15716686dcee775
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
|
|
|
|
|
|
|
| |
The ifdefs were for version 1.2.0.
Change-Id: Ie58745c7cf4c0fba45bc5203d24e9913d3a8b8ce
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
|
|
|
|
|
| |
Change-Id: I7e6b4460aac92cb9669ac1d0d0f4785a8444925d
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
|
|
|
|
|
|
|
|
|
| |
If there was no resource for the given wl_resource*, don't try to dereference
it.
Change-Id: I3a27a5805699148bb26029e8b4179042c3c1117a
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
src/client/qwaylandxdgsurface.cpp
src/plugins/shellintegration/xdg-shell-v5/qwaylandxdgsurfacev5.cpp
src/plugins/shellintegration/xdg-shell-v6/qwaylandxdgshellv6.cpp
src/plugins/shellintegration/xdg-shell-v6/qwaylandxdgshellv6_p.h
Done-with: Johan Klokkhammer Helsing <johan.helsing@qt.io>
Change-Id: Ia39be6254a95af1c4efa831358cc06a697da3423
|
| |
| |
| |
| |
| |
| |
| |
| | |
Until we figure out the cause, just skip it.
Task-number: QTBUG-68756
Change-Id: I70d84ddabae4ef9df834ff8a471dddeee97e18f9
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
|
|\|
| |
| |
| |
| |
| |
| | |
Conflicts:
.qmake.conf
Change-Id: I6596d1a127cc93e53ec30cd881da1810cb8076d5
|
| |
| |
| |
| |
| |
| |
| |
| | |
It will cause libwayland to terminate the application.
Task-number: QTBUG-68715
Change-Id: I1d1830453da224bec8bf4c5d6ab087c0e05328a8
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
|
| |
| |
| |
| |
| |
| |
| | |
Similarly to what we do for xdg-shell v6.
Change-Id: Id72d0af53c7bcee461b741341bf6b587ffe98522
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: Ifb7a1d63a136349cd99d516e63732b4393967468
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
|
| |
| |
| |
| |
| |
| |
| | |
Fixes some flaky tests
Change-Id: Ifac7c95d12714d61afc37f879f4c70b2a7dbe0cf
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: I4b63edef6ea130ad7f7f294bf0903d84b8db4723
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
|
|\|
| |
| |
| | |
Change-Id: I8a1570eac9bbe418283522624002f8a03dd60c95
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
We already have a QTRY_VERIFY(!compositor->surface()); in
tst_WaylandClient::cleanup() which is already run after every test.
The assertions from tests that are explicitly testing surface creation and
destruction have not been removed.
Change-Id: I21d574f5fe33d4e4c309dcfb2f50bde447238df2
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
|
|\|
| |
| |
| | |
Change-Id: I50c42c52a7b646317c7a87f364507fe232a55bf0
|
| |
| |
| |
| |
| |
| |
| |
| | |
The QWindow we use may have devicePixelRatio != 1 and that caused the
test to fail.
Change-Id: I3d248ed85cea521a3d543026a87f92c085116461
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Also change the protocol name in the xml file from xdg_shell to
xdg_shell_unstable_v5 (similar pattern as v6) because qtwaylandscanner doesn't
support the file name being different from the protocol name.
Change-Id: I1d9edf7c8ca512e716284250a2b2bc13e205c33c
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The implementation was broken because it:
1. Didn't activate popups.
2. Activated toplevels with keyboard focus twice.
3. Tried to cast to xdg-shell-v5 classes, so windows were never deactivated.
Change-Id: If492ebdbcd10a3214424f7bf6ac01e7ba8704bbf
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The problem:
The code in QWaylandWindow::setWindowStateInternal made many assumptions about
how the shell surface responded to new window states, and when and if they were
applied. Particularly:
- The shell integrations support different subsets of Qt::WindowStates, so it
doesn't make sense to map from states to setFullscreen, setNormal, etc. in
QWaylandWindow because it really depends on the shell integration how it
should be handled.
- Some states are not supported/unknown on some shells and should immediately be
rejected.
- On some shells, particularly those where the current state is unknown, flags
need to be resent even though they didn't change.
- Should handleWindowStatesChanged be called immediately (client decides) or
should it wait for a configure event (compositor decides)? I.e. the mState
variable only makes sense for some shells.
Furthermore, when state changes come from the compositors, some shell
integrations require that a configure event is acked by the client and that the
next committed buffer's size and content matches that configure event.
Previously, we would just ack immediately and still send a buffer with the old
size before a correct frame was drawn. i.e. sending incorrect acks, which would
lead to protocol errors on some compositors.
Additionally, QWaylandWindow::createDecoration() also assumed that windows
should have decorations unless they are fullscreen. This is not always the
case, particularly on ivi-application and probably on future shell integrations
for embedded or tiling window managers etc.
The Solution:
The responsibility of mapping requested window states to Wayland requests have
been moved to the QWaylandShellSurface implementation. QWaylandWindow now calls
a new virtual, QWaylandShellSurface::requestWindowStates(Qt::WindowStates),
instead of trying to be smart about it. The virtual getters and setters for
window states have now been removed from the QWaylandShellSurface interface.
It's now also the shell surface implementation's responsibility to call
QWaylandWindow::handleWindowStatesChanged if and when it knows a new state is
effective.
QWaylandWindow::configure has been replaced with
QWaylandWindow::applyConfigureWhenPossible(), which causes another new virtual,
QWaylandShellSurface::applyConfigure(), to be called whenever we're free to
resize and change the states of the next buffer (this is when states should be
acked). This means that shells that use acked states need to store the pending
states themselves, call applyConfigureWhenPossible(), wait for applyConfigure()
to be called, call resizeFromApplyConfigure() and handleWindowStatesChanged(),
and finally ack the applied state.
Acked state for xdg-shell v5 and v6 has now been implemented, which also means
we've now:
[ChangeLog][QPA plugin] Implemented support for maximizing, minimizing, and
setting fullscreen with xdg-shell unstable v6.
[ChangeLog][QPA plugin] QWindow::isActive now follows configure events on
xdg-shell unstable v6 (like v5).
QWaylandWindow::createDecoration queries QWaylandShellSurface::wantsDecoration
before creating window decorations, instead of using the previously unreliable
QWaylandWindow::isFullscreen().
[ChangeLog][QPA plugin] Window decorations are now automatically disabled for
ivi-application.
The refactor also removes a couple of hacks:
- QWindowSystemInterface::flushWindowSystemEvents() was called in
QWaylandWindow::setWindowStates. Since this hack was introduced, the events
now have oldState and newState members, and their values seem to make sense
(ensured in the tests).
- The hack for unminimizing on xdg-shell v5 in QWaylandWindow::createDecoration
was not needed anymore.
Finally, tests have been added for xdg-shell v6 to ensure that the right Wayland
requests are sent, that we respond to configure events from the compositor, and
that the Qt events and signals emitted on the client side make sense.
Task-number: QTBUG-53702
Task-number: QTBUG-63417
Task-number: QTBUG-63748
Task-number: QTBUG-66928
Change-Id: Ib4c36b69105750f9dbdcc78adcf71e2e994cc70d
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Makes it possible to send keyboard events using the QML API:
Button {
onPressedChanged: seat.sendKeyEvent(Qt.Key_Left, pressed)
}
The wl_keyboard.key event requires a keyboard scan code, so in order to get
this we iterate over all the keys in the current keymap checking which QtKey
they map to, storing the results in a QMap which is reused by later calls to
QWaylandKeymap::toScanCode.
This also fixes a bug when sending QKeyEvents without a native scan code using
QWaylandSeat::sendFullKeyEvent. (generated key events have no nativeScanCode).
Now we try QWaylandKeyboard::toScanCode, and if unsuccessful we return with a
warning instead of letting the assertion in QWaylandKeyboard fail.
This also adds more thorough testing for the keyboard, including keymaps and
checking that the events, including enter and leave, are actually received on
the client side.
Change-Id: I601b0c7d909071863abb146bd65a990215dcaff7
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
|
|
|
|
|
|
| |
Task-number: QTBUG-63411
Change-Id: I56c367a1801d215e93bf195332272cfee300cdd8
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
|
|
|
|
|
|
|
| |
And not just the default one.
Change-Id: I6debbda9ae249f5f9df914901dc60722253b7d09
Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
|
|
|
|
|
| |
Change-Id: Ic133b41bdcfb98418be4a0141f382734f1d5db85
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
|
|
|
|
|
|
|
|
| |
Tests ivi surface creation and configuration.
Task-number: QTBUG-66512
Change-Id: Idff60eb99eb34b7fce1c935bd036ef18a8f97d7c
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
xdg-shell >= unstable v6 requires surfaces to be configured before buffers can
be attached. Make sure to send a configure event when a compositor would
normally do it.
Task-number: QTBUG-66510
Change-Id: Icbff6ebaa597e858d92d621849aa0df7a8a976f3
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
|
|
|
|
|
|
| |
Task-number: QTBUG-66689
Change-Id: Ifdf38a9ab73357fdbe61e77f0464b227ddd2e8ac
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
|
|
|
|
|
| |
Change-Id: I932cd20f17b5486a1161569c5e9a3feebabeee8e
Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
|
|
|
|
|
|
|
|
|
| |
A failed wl_display_connect should make the platform plugin fail gracefully.
Add a test for it to make sure.
Change-Id: I87a3d9ee151fcdb1bc6ad9ffba44ad5014ede005
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
|
|
|
|
|
|
|
|
| |
The test is still skipped due to CI problems, though (QTBUG-65802).
Task-number: QTBUG-66511
Change-Id: I79a67a80708de4cf2a7347a96c4b6344182d3ae0
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
|
|
|
|
|
|
|
|
|
|
| |
Applied automatic fixes using clang-tidy's modernize-use-override.
This adds the "override" keyword where it's possible and also removes the
"virtual" keyword when redundant.
Change-Id: I899950e5cf8782785d30a245a9c69c1720905d50
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
|
|
|
|
|
|
|
|
| |
Initialize to nullptr to prevent undefined behavior.
Change-Id: I7753c0be77a886d62ecb1cd7b86fc8c98340b0b8
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
clang-tidy -p compile_commands.json $file \
-checks='-*,modernize-use-default-member-init,readability-redundant-member-init' \
-config='{CheckOptions: [{key: modernize-use-default-member-init.UseAssignment, value: "1"}]}' \
-header-filter='qtwayland' \
-fix
Afterwards I ran search and replace on the diff to clean up some whitespace errors:
- Replaced '(\n\+[^:\n]*)(:\s+\+\s+)' with '$1: '
- Replaced '(\n\+[^,\n]*)(,\s+\+\s+)' with '$1, '
- Replaced '\n\+\s*\n' with '\n'
I also had to do some manual edits, because for some reason, this particular
clang-tidy check doesn't trigger for some files.
Change-Id: I3b3909bac4bf20108bbe8ad1e01bcc54236dae1b
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
|
|
|
|
| |
Removes a lot of boiler-plate code and makes the two shells more similar. This
also makes it easier to extend the shells with additional mocking
functionality.
Change-Id: I4a846b06eeda695527d7c5679df339beae983af6
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
|
|
|
|
|
|
|
|
| |
QBackingStore had a pointer to TestWindow window, but it was destroyed only
after the TestWindow was already deleted.
Change-Id: Id8fe38277cf843d532f2d8c2fdbe1f69d0309a7f
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In QWaylandWindow::virtualSiblings, don't include screens that have not been
added yet. I.e. QWaylandScreens for which QPlatformIntegration::screenAdded has
not yet been called.
There are two reasons why this crash wasn't covered by the
removePrimaryScreen() test. First of all, the mock output didn't send
wl_output.done events when updating the mode/geometry. These wayland events are
what causes QWindowSystemInterface::handleScreenGeometryChange() to be called
(where virtualSiblings are called).
Furthermore, virtualSiblings is only called when the geometry actually changes,
so add a new test that changes the screen geometry of the existing screen while
a new one is being added (i.e. moves it to the right).
Task-number: QTBUG-62044
Change-Id: I623fbf8799d21c6b9293e7120ded301277639cc6
Reviewed-by: David Edmundson <davidedmundson@kde.org>
Reviewed-by: Aleix Pol
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The test was flaky because we have a workaround for a bug in Weston where
Weston fails to send the last wl_touch.frame event (QTBUG-36602). We've worked
around it by letting our client handle the wl_touch.up event before the frame
event if it's the last up event.
This caused a race condition in our tests, though (which include the frame
event). Because Q_TRY_COMPARE(window.touchEventCount, 1) would pass and the
window was sometimes destroyed before the frame event had been sent by the
compositor thread.
Work around it by moving the touch testing before the pointer testing, so the
surface is still alive when the compositor tries to send the frame event. That
way the test will not be flaky, and will continue to work when we eventually
remove the workaround in QWaylandInputDevice.
Task-number: QTBUG-66537
Change-Id: I5673445682810e75343c6df2d1b2a4f1c1b21bcb
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
|
|
|
|
|
|
|
|
| |
Applied automatic fixes using clang-tidy's modernize-use-nullptr, and some
manual cleanup to prevent QFlag macros to be affected.
Change-Id: I88f94390185bc6e6f23693b68723cd5710815ae6
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
|
|
|
|
|
|
|
|
|
| |
Adds an assert so tst_WaylandClientXdgShellV6::createDestroyWindow verifies
deletion order.
Task-number: QTBUG-65568
Change-Id: I0b4dd350f811495a9c7a78811915647fb713a43a
Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
|
|\
| |
| |
| | |
Change-Id: I603cbb164e6015c1bb7796bd8bb055d84dbc3b04
|
| |\
| | |
| | |
| | | |
Change-Id: I6c201769561f53d88c89f75cce7d9a7b2643d2f6
|