| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Task-number: QTBUG-73524
Change-Id: Ie9a13aeae52a7576699147e5515e2ed32a3a4d1c
Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
|
|
|
|
|
|
|
|
|
| |
When the cursor focus' wl_surface is destroyed, or the pointer leaves a
surface, we have to reset the enter serial to avoid sending illegal set_cursor
requests.
Change-Id: I0c886e4123acb4aebd325b07bf15b9d3fa8589da
Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
|
|
|
|
|
|
|
| |
Let's simplify all those pointer()->surfaceCursor() calls.
Change-Id: I83c51f460fa2313a0b84c8c64509d48027156443
Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Not all setups or themes have cursors with a matching DPI. In such cases,
wl_cursor_load_theme will then return a theme that is the closest resolution it
can get.
With the previous implementation, cursors themes without a high dpi version
would become become really tiny on high DPI displays.
This patch prevents it by setting a lower wl_surface.scale for those themes.
This also implements proper tracking of the cursor surface's entered outputs
(i.e. if the entered surface is destroyed, the scale is reset, and similarly
the following sequence of events should also be handled:
wl_surface.enter(wl_output@1)
wl_surface.enter(wl_output@2)
wl_surface.leave(wl_output@2)
In the old implementation, we would be stuck with the scale from wl_output@2,
but now we now should correctly get the scale of wl_output@1.
[ChangeLog][QPA plugin] Cursors on high DPI screens are now scaled up if the
cursor theme does not have an appropriate high resolution version.
Change-Id: Ic87d00e35612b5afdf8c2e3a4463fcfef1f1f09d
Reviewed-by: Giulio Camuffo <giulio.camuffo@kdab.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Also refactors the mocking code for data device manager and implements its
isClean method to verify there are no leaks after each test.
MockCompositor::DataDevice now persists across get_data_device requests.
Task-number: QTBUG-73825
Change-Id: Ib5866e0c54d021e12557f9a96f27950010f2611b
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch is mostly a cleanup to prepare for implementations of
xcursor-configuration, but also fixes a couple of issues.
Most of the logic has now been moved out of QWaylandDisplay and QWaylandCursor
and into QWaylandInputDevice and QWaylandInputDevice::Pointer. QWaylandDisplay
now only contains mechanisms for avoiding loading the same theme multiple
times.
There is now only one setCursor method on QWaylandInputDevice, accepting a
QCursor and storing its values so changing scale factor doesn't require calling
setCursor again. QWaylandInputDevice::Pointer::updateCursor() is called
instead.
Cursor buffer scale is now set according to enter/leave events of the cursor
surface itself instead of the current window, this fixes incorrect buffer
scales for cursors on windows that span multiple outputs. The window buffer
scale can still be passed into the seat as a fallback until the first enter
event is received.
This also fixes a bug where the QWaylandBuffer of a bitmap cursor could be
deleted while it was being used as a cursor.
[ChangeLog][QPA plugin] Fixed a bug where the DPI of bitmap cursors were not
sent to the compositor, leading to the compositor incorrectly scaling the
cursor up or down.
[ChangeLog][QPA plugin] Fixed a bug where bitmap cursor hotspots were off when
the screen scale factor was different from the bitmap cursor device pixel
ratio.
Task-number: QTBUG-68571
Change-Id: I747a47ffff01b7b5f6a0ede3552ab37884c4fa60
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
|
|
|
|
|
|
|
| |
The QVector m_surface is modified in both threads.
Change-Id: I1818a5e1307d191f1613513b86703eaa7bda3c6e
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
|
|
|
|
|
|
|
|
| |
This used to cause protocol errors.
Task-number: QTBUG-71734
Change-Id: Ic937210fc42c93f1d411fb0fb4f269de01f07b5b
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
|
|
|
|
|
|
|
|
|
|
|
| |
[ChangeLog][QPA plugin] Fixed a bug where pasting from the clipboard would
prefer ASCII over UTF-8, causing loss of special characters.
The bug was fixed in QtBase, this is just the test.
Task-number: QTBUG-54786
Change-Id: Ibe08bf455ad0be8fdd7a3e082dec6131f19c25d6
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
|
|
|
|
|
| |
Change-Id: Id89ec40a3f484808385401829a09a43781a1bed7
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
|
|
|
|
|
| |
Change-Id: Ib28be5277af9145834c7808f993c747e21845616
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
[ChangeLog][Compositor] Add deprecated support for the deprecated wl_scaler.
Some clients are stuck on the unofficial Weston protocol wl_scaler instead of
the standardized and stable wp_viewporter. This implements optional support for
wl_scaler.
This patch has been written to be easily removable in Qt 6, and touches a
minimal amount of other code.
The implementation can be tested using the new manual test compositor:
tests/manual/wlscaler.
Weston 1.11.1 has a demo client named weston-resizor, which can be used to
test. Note that although newer versions of Weston also have weston-resizor,
those versions use wp_viewporter instead of wl_scaler, so you really need
1.11.1 or earlier to test.
Fixes: QTBUG-69635
Change-Id: Id572e28044cd764eaf63b1259a92bc589711c39d
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
|
|
|
|
|
|
|
|
|
|
|
|
| |
The plugins subdir which includes the platform plugins was not built without
the feature wayland-server. Moves the checks inside the plugins folder to make
it build.
Also disables some tests that won't pass without the compositor API.
Fixes: QTBUG-73169
Change-Id: Ie68badd2ff62ee544c31edaff7c732082e0a4115
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
|
|
|
|
|
| |
Change-Id: Ib9dbad2e7312dab94cecbc1a14315dcb47c8c46a
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
|
|\
| |
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
.qmake.conf
src/3rdparty/protocol/qt_attribution.json
src/client/qwaylandintegration.cpp
Change-Id: I475889f2817c7094b68a2948fdd34ddf8b0c486f
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| |
| |
| | |
Test custom surface destruction as well.
Change-Id: Iad980858c3473e784cd0611136042bfacd09bddf
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
These signals were never tested, in fact there was a bug where
outputAdded was not emitted if a new output was added with
QWaylandCompositor::setDefaultOutput() that was fixed
in 9875a14daaec12ca65d3cb4a2aaf2c4582e6191d.
Also while we are here, set the default output for TestCompositor.
Change-Id: I21c2ff2f51f52b38f2dc992bcc9c03fd3071e82d
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
It seems clients are sometimes sending more geometry events than needed,
causing the tests to fail. Skip the tests for now to make builds pass again.
Fixes: QTBUG-73130
Change-Id: Ia9f82ddd3561d84119dc4d9f8ef15ebc48964148
Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Adds handler for the new name event and updates tests accordingly.
This means QScreen::name() will now typically return strings like: "VGA-1",
"WL-1", "DP-2", "HDMI-A-1" instead of "Screen25", "Screen26", "Screen27" etc.
Change-Id: I3d5748a2fd0d772e2344ac53f0ed808790a84ba5
Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
|
| |
| |
| |
| |
| | |
Change-Id: I4b460bd1e5ac8541dcbf9afb2782187218d257e1
Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Also removes overlapping old tests and adds a (currently failing) test for
QTBUG-72828.
Task-number: QTBUG-72828
Change-Id: Id93d5872ed1c4f181935c1e493e9d8d0ae9cfaf3
Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
|
| |
| |
| |
| |
| | |
Change-Id: I2f336a81682317b1f7dc939d911906b4db60a386
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
|
| |
| |
| |
| |
| | |
Change-Id: I60605f494eebfde9a7737911eefe69a93041ced5
Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
|
| |
| |
| |
| |
| |
| |
| | |
[ChangeLog][Compositor] Added support for the viewporter Wayland extension.
Change-Id: I1d33652fab6ff18da4ae1ae3497f0ca43517420a
Reviewed-by: Pier Luigi Fiorini <pierluigi.fiorini@liri.io>
|
|\|
| |
| |
| |
| |
| |
| |
| | |
Conflicts:
README
src/hardwareintegration/client/xcomposite_share/xcomposite_share.pri
Change-Id: I7cbbf39916821f0f1749e3ccab3151f68f4aa1ac
|
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
| |
| |
| |
| |
| | |
Change-Id: I2eb9bf8aa03e8df61a26d26da061f4030d8de0be
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
There are a number of issues with the current client testing:
- Adding new compositor functionality is cumbersome (need to add compositor
send method, command, implementation, not to mention creating new wrapper
objects.
- Customizing available globals and their versions is not possible and would be
hard to implement. I.e. how to test that functionality works with old and new
versions of an interface? Handle globals being destroyed. We did this with
wl_output, but it was painfully cumbersome.
- Hard to verify that the compositor state is clean between tests. It is
currently done in some tests, but requires boiler plate code which needs to
be added and maintained for each test.
- In general lots of boiler-plate for new tests. (We have to have separate
tests as long as Qt has global/static state. I.e. if one shell extension has
been initialized, we can't deinitialize and initialize another one, so tests
have to be separate.)
- Dispatching server events tied to the client event loop sometimes makes it
hard to write tests without deadlocks.
- Abstraction, encapsulation and automatic behavior that can't be disabled
makes it hard to test low-level functionality like surface exposure.
So, in an attempt to mitigate these issues, I wrote a new testing framework.
- Compositor dispatch is running continuously in it's own thread, access to
compositor state is guarded by a mutex on the compositor, locking this will
make dispatching stop, so the test can safely access internals. Although a
bit cumbersome at first this makes it much easier to directly use server
protocol commands from the test itself, i.e. no need to create commands for
every single thing we want to test.
- The CoreCompositor::exec template method can accept a lambda that will be run
with dispatching stopped. It can also return a value, conveniently letting us
safely extract or modify compositor state from tests.
- This framework also takes full advantage of the qtwaylandscanner, using
wrapper classes for everything, reducing boiler plate considerably.
- The compositor parts are designed to do as little as possible automatically,
but still provide easy ways to enable common functionality, like releasing
buffers automatically, configuring shell surfaces etc.
- Compositor globals are pluggable, use add<GlobalClass>() and
remove<GlobalClass>() to add new global interfaces. I.e. easy to create a
compositor with or without data_device_manager for instance.
- DefaultCompositor provides a sensible default set of functionality and
convenience methods for most test-cases. Custom ones can still be made by
inheriting from CoreCompositor directly instead or by removing or adding
globals to DefaultCompositor.
- Globals have an isClean() method. Implement it to verify that the client
didn't leave any objects lying around from the previous test.
CoreCompositor::isClean calls isClean on the globals so a single call is all
that's needed.
In short, we've traded mock compositor encapsulation and thread safety
guarantees for less boiler-plate, easier and more convenient access to
internals.
Anything accessing compositor state should go into a exec() call, or through
the wrapper macros QCOMPOSITOR_VERIFY and QCOMPOSITOR_COMPARE (or the TRY
versions). I've also tried to make the compositor print warnings if compositor
state is accessed in an unsafe way.
The mock compositor is currently built once per test due to CI limitations
(same thing as with the old tests).
Change-Id: Ia3feb80ce175d3814292b7f4768a0cc719f8b0e8
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Several properties were using pixel coordinates and surface coordinates without
converting.
[ChangeLog][Compositor] QWaylandSurface::destinationSize has been added which
returns the size of the surface that will be displayed on the screen in surface
coordinates.
[ChangeLog][Compositor] Fixed a bug where QWaylandSurface::inputRegionContains
would return true for some points outside surfaces with buffer scale > 1.
[ChangeLog][Compositor] Fixed a bug which caused ShellSurfaceItems for surfaces
with buffer scale > 1 to move too much when resizing interactively.
It also gets rid of all calls to QWaylandSurface::size, which confusingly
returns the size of the surface's buffer in pixel coordinates. Most properties
now use destionationSize's surface coordinates consistently. Hopefully,
QWaylandSurface::size can be renamed or removed in Qt 6.
Change-Id: I007256a8df7759cf74fbfd51624fa1f90c083336
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
[ChangeLog][QPA plugin] Added support for fullscreen-shell unstable v1.
The fullscreen_shell_unstable_v1 interface displays a single surface
per output and it is used for nested compositors, where each output
is rendered in a surface that is then displayed by the main
compositor.
For example weston could be the main compositor and a QML compositor
could be launched as a client using this shell integration to
display it inside weston.
Change-Id: I037679a283ff03cb4bdf4b3fed59945090ec9250
Reviewed-by: Johan Helsing <johan.helsing@qt.io>
|
|\|
| |
| |
| | |
Change-Id: I1d9281750b06f7584e55759994dc6fcbcc5b2455
|
| |
| |
| |
| |
| |
| |
| |
| | |
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>
|
|\|
| |
| |
| | |
Change-Id: I36baa27b69b755f81de9cda94113d338f06c34a1
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
[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>
|
|/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
wayland-client.h and wayland-server.h includes protocol generated for the
version of wayland.xml corresponding to the libwayland version. This becomes a
problem when we want to support a version of wayland.xml that's newer than the
system libwayland.
The solution is to include wayland-client-core.h and wayland-client-server.h
instead. These headers don't include any wayland-scanner generated code, so we
can safely compile and link code generated against the version of wayland.xml
that we ship.
[ChangeLog] Code generated by qtwaylandscanner now includes
wayland-client-core.h and wayland-server-core.h instead of wayland-client.h and
wayland-server.h. This might break source compatibility for code using custom
wayland extensions.
Fixes: QTBUG-70553
Change-Id: Ice0cdb60ecc4f936acc0e158b96f7978549f62c1
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>
|