16 Commits (44176c6a8cbff6c6eda3bbcbe90e87a68e94a17d)

Author SHA1 Message Date
Vlad Zahorodnii 3cdc97a4e9 Avoid converting socket name between QString and QByteArray back and forth
It only contributes overhead.
4 years ago
Vlad Zahorodnii 4ce853e8e4 Prettify license headers 4 years ago
Vlad Zahorodnii 1fb9f6f13a Switch to SPDX license markers
The main advantage of SPDX license identifiers over the traditional
license headers is that it's more difficult to overlook inappropriate
licenses for kwin, for example GPL 3. We also don't have to copy a
lot of boilerplate text.

In order to create this change, I ran licensedigger -r -c from the
toplevel source directory.
4 years ago
Vlad Zahorodnii d1b35f306d Introduce started signal in Application
The new signal is emitted when the Application has fully been initialized.

It allows us to change the startup sequence, for example create workspace
before starting the Xwayland server, without making any adjustments in our
test suit.
4 years ago
Aleix Pol 6abd23ed02 Make it possible to have a separate cursor for the tablet
Summary:
As is KWin only had 1 Cursor which was a singleton. This made it impossible for
us to properly implement the tablet (as in drawing tablets) support and show where
we're drawing.
This patch makes it possible to have different Cursors in KWin, it makes all the
current code still follow the mouse but the tablet can still render a cursor.

Test Plan: Tests pass, been using it and works as well as before but with beautiful tablet cursors.

Reviewers: #kwin, cblack, davidedmundson

Reviewed By: #kwin, cblack, davidedmundson

Subscribers: davidedmundson, cblack, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D28155
5 years ago
Vlad Zahorodnii be759b7d33 Use AbstractClient instead of XdgShellClient wherever possible
Summary:
Currently, we have only one shell client type - XdgShellClient. We use
it when we are dealing with Wayland clients. But it isn't really a good
idea because we may need to support shell surfaces other than xdg-shell
ones, for example input panel surfaces.

In order to make kwin more extensible, this change replaces all usages
of the XdgShellClient class with the AbstractClient class.

Test Plan: Existing tests pass.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: davidedmundson, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D27778
5 years ago
Vlad Zahorodnii 55b4912004 Update my email address 5 years ago
Vlad Zahorodnii 69a3517e02 Merge branch 'Plasma/5.17' 5 years ago
Vlad Zahorodnii a738ecce85 [scripting] Provide conversion functions for AbstractClient
Summary:
If no conversion functions are provided for a QObject-subclass, then
QScriptEngine will use QScriptEngine::newQObject() method without any
special options to convert an instance of that QObject-subclass to a
QScriptValue. However, it's very important that every client object is
wrapped with PreferExistingWrapperObject option. We need that option
because a script may set a property on a client object and that property
must remain until it's deleted by the script.

BUG: 413044
FIXED-IN: 5.17.2

Test Plan: New test.

Reviewers: #kwin, davidedmundson

Reviewed By: #kwin, davidedmundson

Subscribers: davidedmundson, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D24944
5 years ago
Yuri Chornoivan bf58da3e9a Fix minor EBN issues 6 years ago
Martin Gräßlin b221d529a2 [autotests] Fix touch screen edge test after setting a default
Changes the config mocking to not have an action on the left edge which
conflicts with the test condition.
7 years ago
Martin Gräßlin 2be1625822 Add support for new touch screen callbacks to KWin scripts and scripted effects
Summary:
Exposes two new global JS functions to register and unregister touch
screen edges.

Test Plan: Added test case

Reviewers: #kwin, #plasma

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D5277
8 years ago
Martin Gräßlin 63b1138307 Add support for new touch screen edge actions to declarative KWin scripts
Summary:
This change introduces a new property mode in ScreenEdgeItem to switch
between Pointer and Touch mode. The touch mode interacts with the new
touch screen edge gestures through a QAction.

Test Plan: New test case added

Reviewers: #kwin, #plasma

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D5272
8 years ago
David Edmundson b32cdc5653 Add method unregisterScreenEdge to scripting
Test Plan: Used in a script. Works.

Reviewers: #kwin, graesslin

Reviewed By: #kwin, graesslin

Subscribers: graesslin, kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D2261
8 years ago
Martin Gräßlin c3dfacc3dc Improve introspection into Scripting for KWin core/testing
Summary:
This change introduces a Scripting::findScript method which returns
the AbstractScript. Thus a test can load a script, retrieve it and
trigger run on it. As the test would also need to know when finally
the test is running a signal is introduced to notify about it.

This makes the scripting ScreenEdgeTest way more reliable. The test
had been failing on both build.kde.org and build.neon.kde.org due to
not knowing when the script is loaded.

Reviewers: #kwin

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D2497
8 years ago
Martin Gräßlin 17abac9db3 [autotest/integration] Add a test case for screenedge usage in Scripts
A new sub-directory scripting is added in autotests/integration to
gather all test cases related to scripting.

The first added test case verifies the activation of screen edges. For
that it loads a helper script, which reserves an edge based on config.
When the edge is triggered showing desktop is activated.
8 years ago