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.
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.
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.
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.
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.
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