The major difference between this version and the previous is that kwin
no longer forwards the opacity to the app window if it runs as a
window window manager and a compositing manager. As Keith Packard said [1]
> The window manager support is only needed to forward the property from the
> application window to the frame; with the Composite extension, a
> compositing manager can then take that value into account when
> constructing the desktop image. Any X server can implement the Composite
> extension; the one in the X server project at freedesktop.org is just one
> such. It would be trivial to implement this extension in a direct FB
> based X server, or any other X server which places windows in off-screen
> images.
There are a couple of reasons to do so: (a) simplifies code, (b) we don't
temper with opacities on override-redirect windows.
[1] https://listman.redhat.com/archives/xdg-list/2003-December/msg00153.html
plasmashell provides the compositor buffers with an alpha channel and
without indicating the opaque region. Given that, kwin forces a bpp of
24 for desktop windows to improve performance. Unfortunately, there are
legit cases where plasma may attach a buffer that is not fully opaque,
for example when switching between activities.
BUG: 423545
BUG: 421237
A window id generated by WaylandServer may reference an X11 window
with the same id, which can result in undefined behavior.
The main reason why we needed windowId() was because of the task
switcher. However, since tabbox uses internal ids now, the window id
property can be dropped.
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