The test case sets up apol's screen setup and the panel as described
in the attachements in bug 363804. As the test shows the panel's strut
is incorrectly ignored.
CCBUG: 363804
This new test includes everything used in events.cpp to the mocked
functionality of libinput. Only key event is implemented so far, the
referenced pointer and touch functions are mocked with default values.
The test verifies that a KeyEvent gets created and the key press/release
works as expected.
Summary:
The signals emitted by LibInput::Connection carry the Device for which
the input event was received. This Device is passed to the input handlers.
Custom event classes are added which extend QMouseEvent, QKeyEvent and
QWheelEvent respectively and expose the Device. The Device is only passed
around as a forward declared pointer, so even if compiled without libinput
support, it should still compile.
Event handlers which need to get access to the Device can now just cast
the event pointer to the custom class and access it. This can be used in
future to handle device specific key codes, etc.
As we don't have a proper event classes for touch events the event
handlers do not yet have access to the Device. Here the internal API
needs to be adjusted in future.
Reviewers: #plasma
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D1667
This reverts commit abe582c27d.
To explain: the test uses a mocked implementation of libinput. Because
of that it must not link against libinput. The whole idea is to not link
libinput.
So I'm reverting the addition of libinput to linkage. I don't know the
build error, if it gets presented to me, I'll fix it properly without
having to add a linkage to libinput.
Summary:
Device has a static QVector<Device*> into which each created Device
is added and provides a static method to match a libinput_device* to
the already created Device.
This can be used by the the libinput Event class wrapper to properly
reference the Device the event is for.
Reviewers: #plasma
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D1665
Summary:
Qt's touch event API is rather difficult and complex to implement.
As none of KWin's internal windows supports multi-touch gestures yet,
this is going the easy route and just simulates a left mouse button
press. If in future need arises for touch gesture support on KWin's
internal windows, this can be added.
Test Plan: Tested on exopc with DebugConsole and auto test
Reviewers: #plasma
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D1661
It's currently failing on build.kde.org. I'm not able to reproduce the
failure localy so I can only interpret the failure. The failure looks
like a window is still present in the next executed test case thus
breaking the positioning.
This change ensures that the window is properly gone before going into
the next test case.
Summary:
The usage of libinput is completely mocked. The test covers all the
constant properties read by Device.
There are some features which are not yet tested:
* alphaNumericKeyboard
* supportedButtons
* enabled
The setters for leftHanded and pointerAcceleration are also covered
including the variants where it can fail.
Reviewers: #plasma
Subscribers: plasma-devel
Tags: #plasma
Differential Revision: https://phabricator.kde.org/D1648
Summary:
Touch events are emulating mouse events, in particular left mouse
button.
With this change one can move windows through the decoration, use
the decoration buttons and also support the double click action.
As finding the decoration is pretty much exactly the same as for
pointer events, a new base class is introduces which provides the
functionality of updating the decoration and the shared common
variables.
Reviewers: #plasma
Subscribers: plasma-devel
Projects: #plasma
Differential Revision: https://phabricator.kde.org/D1604
Summary:
Mouse actions like wheel and double click were restricted to the titleBar
area. This made the top most pixel non-interactive as it's not part of the
titleBarArea.
This change makes the complete titlebarPosition interactive. That is it
includes for a "normal" (top) setup also the TopLeft/Top/Right section.
Thus the top most pixel can be double clicked, mouse wheeled, etc.
For the Wayland case the test case is adjusted.
BUG: 362860
FIXED-IN: 5.7.0
Reviewers: #plasma
Subscribers: plasma-devel
Projects: #plasma
Differential Revision: https://phabricator.kde.org/D1596
Summary:
The delay to next cycle dance is needed for Aurorae. Maximizing a
window can result in the decoration being destroyed, in which case
QtQuick can trigger a crash.
A test case is added to simulate the situation and ensure that maximize
still works also after the change.
BUG: 362772
FIXED-IN: 5.6.5
Reviewers: #plasma
Subscribers: plasma-devel
Projects: #plasma
Differential Revision: https://phabricator.kde.org/D1586
Summary:
This ensures that QWindow::setMask works for KWin internal windows.
Without KWin sends all pointer events to the QWindow, even if the
mask says it shouldn't get events.
Reviewers: #plasma
Subscribers: plasma-devel
Projects: #plasma
Differential Revision: https://phabricator.kde.org/D1509
Summary:
Instead of having the Application invoke initOutputs after creating
the Screens, we can just connect to the signal emitted there.
This allows to make initOutputs a private, WaylandServer internal
method.
Reviewers: #plasma
Subscribers: plasma-devel
Projects: #plasma
Differential Revision: https://phabricator.kde.org/D1482
The Scripted and PluginEffectLoader perform locating all effects which
are to be loaded in a thread. When the EffectLoader gets cleared so far
the query did not get canceled. This resulted in effects maybe getting
loaded.
This problems shows on build.kde.org if the test is too fast and tears
down the Effect system while effects are still being queried.
Reviewed-By: David Edmundson
Without the /dev/dri/card0 mesa fails to initialize egl and the test
fails. In order to silence the failure till the system provides the
device file, we better skip the test.
A nullptr crash in that case is fixed in WaylandServer tear-down.
Summary: Move/Resize and Strut tests Wayland tests are affected.
Test Plan: Successful compilation when XCB_ICCCM is not found
Reviewers: graesslin
Reviewed By: graesslin
Subscribers: plasma-devel
Projects: #plasma
Differential Revision: https://phabricator.kde.org/D1476
Removes a diversion between X11 and Wayland. The base class Platform
creates an instance of class Edge with plugin implementations being
able to create a different type.
The X11StandalonePlugin does that and creates a WindowBasedEdge. For
this the implementation of WindowBasedEdge is moved from screenedges
into the plugin.
Unfortunately an ifdef is needed to make the screenedge test still
work as expected. This should be improved in future, e.g. have a good
way to load the platform plugin from the tests.
Reviewers: #plasma
Subscribers: plasma-devel
Projects: #plasma
Differential Revision: https://phabricator.kde.org/D1419
Summary:
The cursor position is the reference KWin uses while moving a window.
If we don't warp the cursor position the window "jumps" to the cursor
position on first movement.
For requests triggered by the client (e.g. widget style) this does not
matter as the cursor is at the correct position. But for tools such as
task bars we should ensure the cursor is at the right pos.
Reviewers: #plasma, hein
Subscribers: plasma-devel
Projects: #plasma
Differential Revision: https://phabricator.kde.org/D1421
Summary:
If a window has an invalid size the decoration also has an invalid
size. This results in the texture used by the
SceneOpenGLDecorationRenderer to be invalid and being reset to null.
Of course we shouldn't try to use this texture to render to.
The change comes with a test case to simulate the situation. We cannot
simulate it with Wayland clients as the geometry can never be empty.
Thus we create an X11 client, resize it to an empty size and unmap it.
This is the first integration test case which creates an X11 Client!
It's also a test case which needs the OpenGL compositor. This will most
likely not work on build.kde.org yet - we need to see what to do about
it. Will need adjustments to get it at least skip on build.kde.org.
BUG: 361551
FIXED-IN: 5.6.3
Reviewers: #plasma
Subscribers: plasma-devel
Projects: #plasma
Differential Revision: https://phabricator.kde.org/D1383
Summary:
Mostly meant for multi-screen setups: we don't want that a strut set on
a window on screen 0 results in screen 1 completely being excluded. Even
if that's strictly seen a client bug, it's better to just ignore the
strut from KWin's side.
The sanity check is implemented in Client::adjustedClientArea.
From a pure standard point of view this change is a EWMH violation and
thus can cause regressions: struts by clients no longer working.
A test case for struts is added, including some invalid combinations
whose strut is ignored with this change.
Reviewers: #plasma
Subscribers: plasma-devel
Projects: #plasma
Differential Revision: https://phabricator.kde.org/D1386
By moving XRandrScreens the creation of screens gets simplified a lot
as there is no need to have windowing system specific init code. It all
just goes through the platform.
This also marks the point where the first X11 specific code is removed
from kwin_wayland.
Reviewers: #plasma, sebas
Subscribers: plasma-devel
Projects: #plasma
Differential Revision: https://phabricator.kde.org/D1355
Summary:
Source code reorganization:
The base class AbstractBackend got renamed to Platform, thus the
"backends" are "platforms" now. As they are plugins they should go
together with other KWin plugins which are nowadays in the folder
plugins.
So new location is plugins/platforms/
Reviewers: #plasma, sebas
Subscribers: plasma-devel
Projects: #plasma
Differential Revision: https://phabricator.kde.org/D1353
Summary:
This is the first change in a refactoring series. The aim is to:
* rename AbstractBackend to Platform
* move backends/ to plugins/platforms/
* don't bind platforms to Wayland only
* provide a platform plugin for "normal" X11
* share more code between X11 and Wayland
This change moves the platform/backend from waylandServer to Application.
The init of the plugin happens directly in the Application from the
KPluginMetaData. There is no need to externally init it and set the
parent.
WaylandServer::backend() currently just delegates to
kwinApp()->platform(), the idea is to drop this method completely.
The test infrastructure is also adjusted to this change.
Test Plan: kwin_wayland still works, all tests pass
Reviewers: #plasma, sebas
Subscribers: plasma-devel
Projects: #plasma
Differential Revision: https://phabricator.kde.org/D1331
On build.kde.org we cannot use the breeze cursor theme. Instead we have
DMZ-White (debian package dmz-cursor-theme).
This change adjusts the PointerInput test to enforce DMZ-White and uses
SizeAllCursor instead of OpenHandCursor as that one seems to be missing
in that theme.
Hopefully with these changes the test starts to pass on build.kde.org.
Summary:
A user shouldn't be able to manually move/resize a desktop window or
a panel. So far this wasn't ensured.
Reviewers: #plasma
Subscribers: plasma-devel
Projects: #plasma
Differential Revision: https://phabricator.kde.org/D1155