Commit graph

12 commits

Author SHA1 Message Date
Vlad Zahorodnii
f24f2bd509 Enable shadow protocol support for all Wayland clients
The main motivation for this change is to enable support for our
proprietary shadow protocol in LayerShellV1Client.

Previously we couldn't move code that handles shadows in WaylandClient
because WaylandClient::bufferGeometry() was a pure virtual method.
2020-09-25 10:10:10 +03:00
Vlad Zahorodnii
790ddc0909 Remove WaylandClient::isInputMethod()
We assume that the input method server has at most one surface at a time,
which corresponds to the virtual keyboard. But it's not guaranteed to be
always true.

For example, an xdg_toplevel surface can be created for a configuration
dialog, in which case isInputMethod() should not return true.
2020-09-04 06:47:38 +00:00
Vlad Zahorodnii
d3cca65d39 Implement the layer-shell v1 protocol
The layer-shell protocol allows wayland clients to create surfaces that
can be used for building desktop environment components such as panels,
notifications, etc.

The support for the plasma-shell protocol will be dropped once plasma in
all its entirety is ported to the layer-shell protocol.
2020-09-03 18:11:44 +00:00
Vlad Zahorodnii
7be4ab97e4 Move XdgSurfaceClient::cleanTabBox() to WaylandClient
It can be useful for other Wayland clients as well.
2020-09-03 18:11:44 +00:00
Vlad Zahorodnii
fde34f3c57 Introduce geometry sync mode flags
The sync mode flags indicate in which fashion position and size update
are made, i.e. synchronous or asynchronous.
2020-09-03 18:11:44 +00:00
Vlad Zahorodnii
7029d9c57c Move XdgSurfaceClient::cleanGrouping() to WaylandClient 2020-09-03 18:11:44 +00:00
Vlad Zahorodnii
4296a38a30 Move geometry handling code from XdgSurfaceClient to WaylandClient 2020-09-03 18:11:44 +00:00
Vlad Zahorodnii
40dca1c93e Implement window hiding in the WaylandClient class
This change upstreams window hiding functionality from the XdgSurfaceClient
class to the WaylandClient class in order to reduce the amount of duplicated
code in new wayland client sub-classes.
2020-08-18 14:21:41 +00:00
Aleix Pol
2ed00e4afe Move XdgSurfaceClient::updateDepth to WaylandClient
It is strictly related to the surface and this way it can be used from
elsewhere.
2020-08-18 10:55:20 +00:00
Vlad Zahorodnii
4ce853e8e4 Prettify license headers 2020-08-07 19:57:56 +00:00
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.
2020-08-07 19:57:56 +00:00
Vlad Zahorodnii
31ea780d79 [wayland] Rework xdg-shell implementation
Summary:
This change splits the XdgShellClient class to better match existing
abstractions in the xdg-shell protocol and fix a few issues related to
sending configure events.

In the new client classes, configure events are handled differently.
Instead of blocking configure events, we try to send them as late as
possible. Delaying configure events will let us merge changeMaximize()
for X11 clients and Wayland clients and it also fixes the bug where
we don't send the final configure event when user has finished resizing
a window.

Given that configure events are not sent immediately, XdgSurfaceClient
keeps the last requested frame geometry and the last requested client
geometry.

This patch doesn't intend to fix all issues in kwin's implementation of
the xdg-shell protocol. For example, we still handle surface unmapping
very poorly.

Test Plan: Tests pass.

Reviewers: #kwin

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D27861
2020-06-01 15:12:59 +03:00