It's the same as the currentDesktop except that it's a VirtualDesktop
object.
The main advantage of the currentVirtualDesktop property is that it
doesn't change if a virtual desktop is added or removed in the middle.
It also makes dealing with virtual desktop changes easier.
With the new virtual desktops model, a window can be on several virtual
desktops. Currently, scripts have no any way to get the list of desktops
the window is on. This change addresses that.
Currently, window thumbnails may be placed behind the panel, which
doesn't look good.
With this, the window heap will cover the same area as the maximize
area.
This makes the WindowHeap more robust to layout changes. Currently, the
main issue with it is that thumbnails will be misplaced if the heap's
scene position changes.
Kirigami.ScenePosition automagically keeps track of the item's scene pos.
If a window is on several virtual desktops, Workspace::switchWindow()
will not work as expected because AbstractClient::desktop() returns the
id of the last virtual desktop.
Since the active window is most likely on the current virtual desktop,
we can use that for filtering out irrelevant windows.
The new overloads take the client (as context) and the desired screen id
or a point and return the client area.
The main motivation behind this change is to make the transition to the
new virtual desktop model where a window can be on several desktops less
painful.
In the recent refactor we made it so environment variables got synced to
the Application::processStartupEnvironment.
It then seemed safe and cleaner to remove the qputenv calls, but this
was not the case. It regressed the unit tests on CI and kglobalaccel
which is another path where kwin spawns clients.
Syncs the primary selection from wayland to X and from X to wayland.
Instead of doing it through the internal connection like the clipboard,
this sets/reacts to changes in SeatInterface::prrimarySelection directly.
BUG:422426
FIXED-IN:5.23
This effect is meant to be as a replacement for the present windows and
the desktop grid effect. It is written using QML.
So far, this effect implements only the basic features of the present
windows effect. Desktop management features will be added later.
CCBUG: 295775
CCBUG: 303438
This allows changing the type of desk to QVector<VirtualDesktop *>.
Based on the dont_activate flag, Workspace::sendClientToDesktop() will
try to focus the window if it's moved to the current virtual desktop.
In order to implement that, it needs to know whether the window has been
on the current desktop. c->isOnDesktop(desk) is a much sophisticated way
to do that.
Workspace::takeActivity() forces the modal dialog and its parent window
to be on the same virtual desktop. It uses int-based desktop ids for
that purpose.
This change ports the relevant parts of Workspace::takeActivity() to the
VirtualDesktop object.
This way if kwin_wayland crashes we don't need to ensure that new
environment variables need to get synced across the new env.
This fixes an issue where spawning an xwayland application from a
wayland window that survives a crash would fail.
By moving the logic here we no longer need to wait for kwin_wayland to
start before starting plasmashell or even ksmserver as all environment
variables are set. As long as the wrapper is ready we can continue
starting and clients will just block on connect.
That should still allow for both a lot of optimisations both for speed
and cleaning up the startplasma-wayland scripts.
This will be addressed in follow up patches.
Use of kwin_wayland directly with xwayland is still supported for
testing.
The initial goal of kwin_wrapper was that it would set up all relevant
environment variables that will be used by the clients of kwin.
This meant having to cache old variables before we overrode them and
pass additional settings to the backends for the old wayland_display. It
works, but with X11 about to move too ends up being unnecessarily
complex. In hindsight it's easier for kwin to have the environment
represent the platform it is currently on, and have kwin explicitly set
variables in the QProcessEnvironment of the session it forks itnto.
This patch is changed so that we set the wayland socket name used by the
wrapper explicitly which is then used by the process environment kwin
uses for the main session.