Summary:
Have one dedicated method which performs the connection for both
Client and ShellClient. This fixes the desktopPresenceChanged signal
not being passed to the effects.
Note that not all signals are merged. Most signals setup for Client
don't make sense for ShellClient as ShellClient cannot block composite
or unredirect.
Test Plan:
Test case added for ShellClient to ensure that the signal
is correctly invoked on the ShellClient, Workspace and EffectsHandler.
Reviewers: #kwin, #plasma_on_wayland
Subscribers: plasma-devel, kwin
Tags: #plasma_on_wayland, #kwin
Differential Revision: https://phabricator.kde.org/D2059
Summary:
If KWin fails to start the Wayland server due to XDG_RUNTIME_DIR not
being set, kwin_wayland should terminate with an error condition but
not crash.
This change makes sure that KWin detects that the Wayland server does
not work and terminates the startup early and ensures that it doesn't
crash while going down.
An error message is shown that we could not create the Wayland server.
Test Plan:
Test case added which verifies that WaylandServer fails to
init. Manual testing that kwin_wayland exits with error 1.
Reviewers: #kwin, #plasma_on_wayland
Subscribers: plasma-devel, kwin
Tags: #plasma_on_wayland, #kwin
Differential Revision: https://phabricator.kde.org/D2078
The struts test is extended by a setup containing two horizontal
screens, bottom aligned with the left screen smaller than the right.
Thus there is a dead area in the top left corner. In addition there's
a panel on top left screen.
Apparently KWin allowed windows to open in the dead area. The test
case reconstructs this by opening a window with the same size hints,
but in the test it's working correctly.
A few more cases where we need to ensure that the created window is
destroyed before going into next test method.
Interesting observation: the generated window ids are identical.
Possible problem with KWayland::ClientConnection?
New test method which verifies that a newly mapped window is rendered
correctly, that cursor image set on it is rendered correctly, also when
pointer moves.
Summary:
Many tests create a Wayland window, render it and then wait till it's
created in KWin as a ShellClient. To reduce code duplication the test
helper provides helper methods to wait for the next ShellClient to be
shown and to directly render and wait for the window for that to be
shown.
Reviewers: #kwin, #plasma_on_wayland
Subscribers: plasma-devel, kwin
Tags: #plasma_on_wayland, #kwin
Differential Revision: https://phabricator.kde.org/D2057
Summary:
A new namespace KWin::Test is added which provides a few helper
functions. It makes it easy to setup a KWayland client connection with
the base set to be able to create a Surface and flags to create
additional interfaces. This replaces the KWayland connection dance in
init() methods. For cleanup() there is also a dedicated helper function.
In addition there are helper functions to:
* render a surface
* create a surface
* create a shell surface
* flush the wayland client connection
* access to the created interfaces - for compatibility with existing code
The idea is to extend this Test library also for other common use cases
like creating an X11 connection and X11 windows, etc.
Reviewers: #kwin, #plasma_on_wayland
Subscribers: plasma-devel, kwin
Tags: #plasma_on_wayland, #kwin
Differential Revision: https://phabricator.kde.org/D2053
Summary:
A dedicated cmake function is added to create a test case. It takes
a NAME, the SRCS and additional LIBS.
Thus it's
integrationTest(NAME myTestCase SRCS test.cpp)
to create a standard integration test.
In addition kwin_wayland_test.cpp is compiled into a static library
to decrease the compile time a little bit.
Reviewers: #kwin, #plasma_on_wayland
Subscribers: plasma-devel, kwin
Tags: #plasma_on_wayland, #kwin
Differential Revision: https://phabricator.kde.org/D2052
Summary:
The idea behind this autotest is inspired by bug 356328 which produced
incorrect rendering results. Also it's inspired by openQA which performs
image reference comparisons.
This test case tries to go further. It creates reference images which
must match the rendering result exactly. So far the test case verifies
the start condition - kwin started and one frame is rendered with default
cursor in the middle of the screen. And it verifies the moving of the
cursor without any windows shown. Whenever the cursor moves a repaint
should be triggered and the old and new area should be properly
repainted.
To support this the test needs some minor changes in KWin:
* Scene provides a frameRendered signal - needed for waiting on frame
* Scene and SceneQPainter are exported
* SceneQPainter provides access to it's Backend, so that we get to the
backbuffer
* ScriptedEffectLoader is exported for getting a list of all scripted
effects - (we don't want fade to manipulate the rendering)
Reviewers: #kwin, #plasma_on_wayland
Subscribers: plasma-devel, kwin
Tags: #plasma_on_wayland, #kwin
Differential Revision: https://phabricator.kde.org/D2046
Test was failing on build.kde.org, though passing locally. This change
tries to make the test more robust to timing issues which makes it
hopefully pass on build.kde.org again.