This is a copy of the code from Qt5.15 with some backported patches from
development branch of Qt.
One of the upcoming fixes introduces new API, which is why we can't rely
on distro packaging.
The cmake macro is mostly copied from ECM, but set to rebuild generated
code when the scanner changes.
The main reason why we have factory methods is that up to some point,
kwayland had its own signal to indicate when globals have to be removed.
Now that all globals add destroy listeners for the wl_display object,
we don't have that signal. Most factory methods are equivalent to doing
new T(display).
Besides adding unnecessary boilerplate code, another reason to get rid
of the factory methods is to reduce the amount of merge conflicts. If
several persons work on implementing wayland protocols at the same time,
sooner or later someone will have to resolve merge conflicts in Display.
Some input related code in kwin is mislead by the fact that when the
input region is infinite, SurfaceInterface::input() is going to return
an empty QRegion object.
We cannot really do that because the client could have just set a valid
empty wl_region object to ignore all input events.
This change makes SurfaceInterface assign an actually infinite region
when a NULL input region has been passed to set_input_region().
- Drop the v0 support, it is no longer used by anything
- Adapt the text-input related methods in seat interface to include
versioning, this will be useful for when zwp_text_input_v3 support is
included in kwayland-server
- Refactor SeatInterface to get rid of globalTextInput, it is no longer
needed with the new approach
- Refactor out the ContentHints and ContentPurpose enums in separate
header file which can be shared by zwp_text_input_v2/3 implementation
Co-Author: Bhushan Shah <bshah@kde.org>
Since the screencast protocol is unstable, the ScreencastInterface class
and the ScreencastStreamInterface class must carry version info in their
class names.
We need to convert the content hint and content purpose to the
protocol values before passing it to the input method since text-input
v0, v2 and v3 have a different values for some of enums. We need to do
manual translation.
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.
The current xdg-shell wrappers don't match existing abstractions in the
xdg-shell protocol well, which makes it more difficult to refactor code
that is responsible for managing configure events and geometry in kwin.
Given that the xdg_decoration and the xdg_shell protocols are tightly
coupled together, I had to rewrite our wrappers for the xdg_decoration
protocol as well.
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
Summary:
Clipboard managers and middle click paste are new protocols.
We want to be able to copy from a clipboard manager to a regular
clipboard and vice versa without duplicating loads of code.
If we support kliper's "syncronise contents of the clipboard and
selection" inside the compositor that would become an unmanageable amount
of combinations.
It also potentially allows the idea of our XWayland bridge not being a
wayland client and simplifying that code.
Test Plan: Unit test passes
Reviewers: #kwin
Subscribers: zzag
Differential Revision: https://phabricator.kde.org/D29329
BlurInterface always used to be my go-to template when starting a new
protocol, we may as well make it up-to-date with the generation.
Code is reduced by a third.
wl_shell_surface has been deprecated for quite a long time. Nowadays
most clients use the xdg-shell protocol to create desktop-style user
interface elements.