Commit graph

31 commits

Author SHA1 Message Date
Vlad Zahorodnii
7d56aa3687 Merge wayland tests with other tests
This makes wayland tests organization consistent with other kwin tests.
2023-10-06 11:21:00 +00:00
Vlad Zahorodnii
10df3b0eb0 Remove Qt 5 specific code 2023-02-28 18:30:26 +02:00
Vlad Zahorodnii
d9f5d432be Port to KF6 2023-02-28 18:30:26 +02:00
Weng Xuetian
ff092b12b0
Add text-input-v1 support
Main reason to support this old interface is because this is the only
protocol chromium (and effectively all electron app) that supports.

The protocol itself very similar to text-input-v2 with some minor difference.
So not hard to support by just duplicate some existing code. There might be
some unclear protocol design issue if kwin need to support multiple SeatInterface,
but for now it should be ok to assume there is only one seat.

Tested using fcitx5 against weston-editor and chromium with flag
--enable-features=UseOzonePlatform --ozone-platform=wayland
--enable-wayland-ime
2023-01-16 10:34:37 -08:00
Vlad Zahorodnii
de3aa69c1e Fix some tests not building with Qt 6
Client-side wrappers for input-method-unstable-v1 fail to build because
wl_keyboard_interface is referenced in the header file generated by
wayland-scanner.

Unfortunately, qt6_generate_wayland_protocol_client_sources() forces
--include-core-only argument, this is addressed in Qt 6.4.1, but in
meanwhile let's ship a copy of Qt6WaylandClientMacros.cmake file until
the required Qt version is out.
2022-10-20 09:37:00 +00:00
Vlad Zahorodnii
eeb701bfe3 Add KWin::Output handle to OutputInterface
That's a necessary change for further output related refactorings. It
also allows us to simplify some OutputInterface to Output mapping code.
2022-08-25 15:08:20 +03:00
Volker Krause
f32df68f3d Use the properly named screencast Wayland protocol file
This is needed to build with Qt6.
2022-05-06 19:12:06 +00:00
Vlad Zahorodnii
b64f95b703 Integrate kwaylandserver
This makes KWin switch to in-tree copy of KWaylandServer codebase.

KWaylandServer namespace has been left as is. It will be addressed later
by renaming classes in order to fit in the KWin namespace.
2022-04-22 12:27:33 +03:00
Volker Krause
6cd0014364 Adapt build system to also support Qt6 2022-03-18 14:34:41 +00:00
Nicolas Fella
ca6fa1cbf0 Use versionless Qt cmake target
This makes it easier to build against both Qt5 and Qt6

GIT_SILENT
2021-01-30 17:24:42 +01:00
Bhushan Shah
e84c1dcac2 input-method-v1: improve the test coverage of the class 2020-10-14 09:34:00 +05:30
Bhushan Shah
48535b8bc1 server: implement the text-input-unstable-v3
This commit implements the zwp_text_input_v3 in kwayland-server, part of
code is inspired based on the initial patch from Roman at D16735.
2020-09-29 16:16:28 +05:30
Vlad Zahorodnii
f8b9ea5680 Rename screencast wrappers according to unstable protocol naming conventions
Since the screencast protocol is unstable, the ScreencastInterface class
and the ScreencastStreamInterface class must carry version info in their
class names.
2020-09-05 14:45:43 +03:00
Vlad Zahorodnii
f8dd1c615b Implement layer-shell v1 protocol 2020-09-03 13:42:36 +03:00
Aleix Pol
5efebc3a38 Provide an initial implementation for input-method-unstable-v1
Makes it possible to implement the protocol in your favourite
compositor.
2020-08-17 20:09:21 +02:00
Aleix Pol
e089092b54 Implement zkde_screencast_stream_unstable_v1 2020-07-23 12:57:17 +00:00
Vlad Zahorodnii
963551d775 Add support for the wp_viewporter protocol
The wp_viewporter compositor extension allows clients to crop and scale
their surface. It can be useful for applications such as video players
because it may potentially reduce their power usage.
2020-06-02 15:33:00 +03:00
Benjamin Port
a452ff1642 Add keyboard_shortcuts_inhibit protocol
Reviewers: zzag, davidedmundson, apol

Subscribers: romangg, crossi, kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D29231
2020-05-29 10:46:47 +02:00
David Edmundson
6156f86548 Add DataControl iface
Summary:
This patch makes use of wlroot's DataControl interface to support
clipboard management.

Unlike wl_data_device clipboards are sent on every change to all
watchers.
If the data device has a selection set it updates immediately.

Because it was started a year ago it uses the existing style of
wrapping objects. The unit test uses the new approach.

Test Plan:
Updated kwin
used wlroot's wl-copy, wl-paste which are xclip replacements to
show that the clipboard updated correctly

Reviewers: #kwin

Differential Revision: https://phabricator.kde.org/D29330
2020-05-26 13:32:56 +01:00
David Edmundson
f7d9dd411c Drop deprecated QtSurfaceExtensionInterface
Summary: This isn't used by kwin or Qt anymore

Differential Revision: https://phabricator.kde.org/D29338
2020-05-18 16:20:57 +01:00
Aleix Pol
5d4cd7dcd3 Fix build 2020-04-29 15:59:23 +02:00
Aleix Pol
d4dad00b52 Provide an implementation for the tablet interface
Summary:
Implements the necessary classes to have proper support for the tablet and pen.
Doesn't implement yet the ring/slider/totem bits.

Test Plan:
Used it with Plasma and GTK clients, together with the kwin patch I'll submit soon.
https://youtu.be/GGx0TlNJlzs

Also I added a test.

Reviewers: #kwin, #frameworks, zzag, davidedmundson

Reviewed By: #kwin, zzag, davidedmundson

Subscribers: davidedmundson, zzag, kde-frameworks-devel

Tags: #frameworks

Differential Revision: https://phabricator.kde.org/D26858
2020-03-20 00:36:01 +01:00
David Faure
cac7d766b1 Make unittest independent from the location of the executable.
Summary:
This fixes the check in the unittest when doing
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
which I intend to do globally at some point.

Turns out it's comparing with its own executable location, so we
can use QCoreApplication to get it generically.

Test Plan: Verified to work with ctest and with "./testWaylandServerDisplay"

Reviewers: graesslin, mart

Reviewed By: graesslin, mart

Subscribers: plasma-devel, #frameworks

Tags: #plasma_on_wayland, #frameworks

Differential Revision: https://phabricator.kde.org/D6974
2017-07-30 01:05:45 +02:00
David Faure
0c42a1bfeb autotests: prepare for CMAKE_RUNTIME_OUTPUT_DIRECTORY being set
Scripted with
perl -pi -e 's/add_test\(([^ ]*) (.*?)\)/add_test(NAME $1 COMMAND $2)/' CMakeLists.txt
2017-07-29 08:27:59 +02:00
Martin Gräßlin
ab85e957a6 [server] Handle no XDG_RUNTIME_DIR situation more gracefully
Summary:
Even if the XDG_RUNTIME_DIR is not set, KWayland should not crash
if methods are invoked which only make sense after the server was
started successfully. This was not yet the case for
Display::dispatchEvents.

Also the wl_display was not destroyed in the situation that creating
the socket failed.

Test Plan:
Test case added which simulates the situation of no
XDG_RUNTIME_DIR being set.

Reviewers: #plasma_on_wayland

Subscribers: plasma-devel

Tags: #plasma_on_wayland

Differential Revision: https://phabricator.kde.org/D2077
2016-07-13 09:20:03 +02:00
Martin Gräßlin
c5a16a535d [autotest] Add a test case for QtSurfaceExtensionInterface
Summary:
KWayland does not have a client implementation of the QtSurfaceExtension
protocol. Thus the test is different: it starts a helper binary which
creates a QWindow. The test closes that one which should terminate the
started applications.

Reviewers: #plasma

Subscribers: plasma-devel

Projects: #plasma

Differential Revision: https://phabricator.kde.org/D1388
2016-04-13 14:20:48 +02:00
Martin Gräßlin
565c832d39 [server] Expose executable path in ClientConnection
Summary: Convenient API to get the absolute executable path for the pid.

Reviewers: sebas, mart

Subscribers: plasma-devel

Differential Revision: https://phabricator.kde.org/D858
2016-01-25 10:56:16 +01:00
Martin Gräßlin
f2628cf831 s/kwin/kwayland in test names 2014-09-17 16:22:34 +02:00
Martin Gräßlin
5e54a86d5e Generate export headers and use it in our headers
Auto tests are adjusted to link against the library instead of compiling
the source files.
2014-09-17 15:10:43 +02:00
Martin Gräßlin
e763d9acc0 Add a build system
Framework style build system which generates two libraries:
* KF5WaylandClient
* KF5WaylandServer

autotests are adjusted to compile again. They need to be changed to
use the libraries once the export header gets generated.
2014-09-17 14:35:33 +02:00
Martin Gräßlin
bc93c5c6a8 Move all files to autotests/server 2014-09-17 13:24:51 +02:00