This legacy session management scheme using the WM_COMMAND property
seems to be called XSM. It is very, very legacy because it was
superseded by XSMP in 1993(!).
By inspecting ~/.config/session/kwin_[...] I could see that Firefox
still sets WM_COMMAND, but nothing else in a regular session with
some applications.
As one of the last applications to switch to XSMP session management,
I guess Firefox keeps doing that because it still needs to work on,
say, Solaris, anyway, so why not set WM_COMMAND on Linux as well.
The WM_COMMAND set by Firefox looks like "wmCommand8=firefox\s" in
the kwin session file. It doesn't actually contain a session
identifier. But then, Firefox only has one session per user anyway.
This goes together with commit 5f0ca1305db4a925 in plasma-workspace /
ksmserver to remove legacy session management support.
I've talked about my plan to do this on IRC with Martin so hopefully
it's okay to just do this now.
The way nearestPowerOfTwo is currently defined allows for the possibility of
left-shifting an int by 32 bits or more, which is undefined behavior on
platforms where int is 32 bits, and is something that can happen here if `s`
is equal to 31 by the end of the loop. Noted by Coverity as CID 1291191.
This patch takes an algorithm to perform the same operation from Hank Warren
Jr.'s book "Hacker's Delight", which should avoid UB.
REVIEW:126540
If a ShellClient supports the ServerSideDecoration interface we can
create a server decoration for it. For that updateDecoration is added
as a pure virtual method in AbstractClient and a more-or-less code copy
from Client is added to ShellClient.
Geometry handling is adjusted to consider the window decoration offsets.
We announce support for it and depending on whether we have a plugin
or not set the default mode to Server or None.
When a decoration interface is created it gets installed on the
ShellClient. But there it isn't properly used yet as we don't have
support for decorations in ShellClient yet.
This describes an additional offset for the client content. On X11
our client content position matches with the window - the window
decoration is part of the overall content coordinate system.
On Wayland the content is an own texture starting at 0/0. Thus a
mapping to texture coordinates will be required when server side
decorations are provided. The new information is used in the scene's
to adjust the rendering and generating of quads.
Replacement for calls to info->input() which is only valid for the Client
sub class, but not for ShellClient.
In ShellClient the implementation is swapped with wantsInput() and
wantsInput() has a new implementation which properly delegates to rules()
just like Client does.
This includes the methods:
* decoration()
* decoration() const
* isDecorated() const
In addition new protected methods are added to destroy the Decoration
and to set it.
Usage of m_decoration in Client code is adjusted.
InputRedirection uses the inputTransformation() to pass to SeatInterface
for focused pointer surface. This prepares for proper input
transformation including scaling and rotation.
During startup it might happen that the QPA is already loaded, but
the wayland server and it's internal connection not yet fully
created. Thus safety check for it.
This change enables kactivities integration by default again on both
X11 and Wayland (as kactivities no longer blocks). As we have an
infrastructure to disable kactivities we can also make use of it and
offer a command line switch to disable kactivities. This might be
useful for using KWin outside of Plasma.
REVIEW: 126153