Commit graph

163 commits

Author SHA1 Message Date
Martin Gräßlin
4e7521fe64 Allow moving of Wayland windows
So far only moving through useractions menu is possible and only through
cursor control (mouse events are lost).

A basic first autotest is added to validate the moving of Windows.
2015-10-26 09:21:36 +01:00
Martin Gräßlin
58bcf66ecf [autotests] Test case for 10ad9262a1
The problem we had was closing a glxgears through an Aurorae theme
crashed KWin inside QtQuick.

This test case simulates the sequence:
1. starts glxgears
2. wait till we have a Client for it
3. send mouse move to guessed close button position
4. send mouse press/release at that position
5. verify the window is closed
6. verify glxgears exits

With the given commit reverted this crashes, with it in place it passes.

Please note: on CI it might fail as glxgears is not yet installed. [1]
Also we cannot enforce using Aurorae from the test yet, though on
the CI system it should get picked automatically as no other deco
plugin should be installed.

[1] Sysadmin ticket already created
2015-10-22 10:08:49 +02:00
Martin Gräßlin
a2b83bffc5 [wayland] Update geometry in ShellClient::setGeometry directly if size didn't change
If the size is the same it's basically just a window movement. That's
nothing we need to roundtrip to the client, but can adjust the geometry
change directly.

The quick tiling test is adjusted to test this together with
sendToScreen. Each window is also sent to the next screen to verify the
state doesn't change and geometry is updated.

Note: the flag for quick maximization seems to get lost in this setup.
2015-10-14 16:38:17 +02:00
Martin Gräßlin
5558d62220 [backends/virtual] Add possibility to have multiple virtual screens
Very basic: all screens have same size and are ordered from left to
right. It's mostly meant to allow easy test cases with multi-screen.

The quick tiling test demonstrates how it's used.
2015-10-14 16:38:17 +02:00
Martin Gräßlin
86448c66dd [wayland] Use first valid geometry of ShellClient as restore geometry
This is needed to properly restore to a valid geometry after quick
maximizing. Note: this is not yet perfect, actually it should be done
after initial placing, which means we do need a manage method like
Client.

The autotest for quick tiling is extended to cover maximize changes
and cover this case.
2015-10-14 12:11:56 +02:00
Martin Gräßlin
996c828da3 [autotest/wayland] Add a test for quick tiling Wayland clients
Base test verifies the quick tile positions. No maximization or direct
state changes tested yet.

Required to have Toplevel and AbstractClient exported. Otherwise we
cannot use the SignalSpy.
2015-10-14 09:58:16 +02:00
Martin Gräßlin
80b6a26a09 [autotests] Enforce QPainter compositing
The change to O2 in 4a35a63d2d didn't
work on the CI, so QPainter it is.
2015-10-09 07:58:30 +02:00
Martin Gräßlin
4a35a63d2d [autotests] Enforce OpenGL compositing
As expected in a025791d7b the tests
fail on the CI system  due to llvmpipe. Let's try whether enforcing
O2 makes them run, if not update to switch to Q is following.
2015-10-09 07:42:34 +02:00
Martin Gräßlin
29b2082daa [wayland] Honor ShellSurfaceInterface::acceptsKeyboardFocus in ::wantsInput
If the surface indicates that it doesn't want keyboard focus we shouldn't
give it keyboard focus.

This was a problem with Kate's autocompletion tool tip windows.

REVIEW: 125553
2015-10-08 12:51:49 +02:00
Martin Gräßlin
b74cae4dbe [autotests] And remove the problematic code
Last version of 4b917da861 was even
worse: doesn't compile. So let's just remove it completely.
2015-10-03 10:04:28 +02:00
Martin Gräßlin
4b917da861 [autotests] Only use QTest::setMainSourcePath if we have Qt 5.5
Update to f5fbdaa6ca which didn't solve
the problem. Seems to be new function in Qt 5.5.
2015-10-03 09:50:37 +02:00
Martin Gräßlin
f5fbdaa6ca [autotests] Don't use QTEST_SET_MAIN_SOURCE_PATH
It fails to build on Kubuntu's CI. Apparently not defined, let's use
what it resolves to on the author's system.
2015-10-02 16:02:13 +02:00
Martin Gräßlin
7fed20f136 [autotest] Welcome to integration testing KWin
This is the beginning of a new testing era for KWin: finally we are
able to test against a running KWin. This works by making use of the
new virtual framebuffer backend for Wayland. It starts a specific
Application subclass which is mostly a fork of ApplicationWayland.

The individual tests are able to influence the socket name and the
size of the virtual screen. This is supposed to be done in
initTestCase. To know when KWin is fully started one can use the
workspaceCreated signal of KWin::Application. KWin is not started in
another process, but the kwin library is used, so the test has pretty
much full introspection to everything going on inside KWin. It can
access the Workspace, WaylandServer, fake input events through
InputRedirection and so on.

Once the test KWin is running it's possible to connect to it using
KWayland::Client library. This allows to introspect the Workspace
to see whether all worked as expected (e.g. correct stacking order,
active window and so on).

This first autotest is mostly meant to illustrate how to setup a
test and how one can use KWayland::Client to interact with the mock
KWin. For more tests it is suggested to move the connections to the
Wayland server in the init() and cleanup() methods.

The change also affects the qpa plugin: the specific check to only
run in binaries called kwin_wayland doesn't hold any more. This can
now be overwritten by an env variable.

Please note that this first test will probably fail in the CI system
as it might not have XWayland which is needed by KWin.
2015-10-02 15:14:41 +02:00