Virtual Desktop and Activities future: Partitioning proposal

Roman Gilg subdiff at gmail.com
Mon Jul 16 19:07:40 BST 2018


The solution aims at replicating functionality that is available today
from user point of view, but tries to improve the internal structure
and implementation.

-----------
Motivation:
-----------
The idea is to keep the two different concepts of VDs and Activities,
but implement them in a more integrated way by defining Activities as
sets of VDs.

--------------------------
Terminology / Definitions:
--------------------------
Virtual Desktop (VD):
Defines a full screen area to be displayed at a certain point in time.
For simplicity we assume full screen means stretched over all
phyisical screens.

Active/activated VD:
The VD currently being displayed to the user.

Partition of a set:
A grouping of the set's elements into non-empty subsets, in such a way
that every element is included in one and only one of the subsets.

Activity set:
A partition of the set of all VDs.

Activity:
One element of the Activity set. In particular it is a subset of VDs.

--------
Remarks:
--------
* There can be arbitrary many VDs, but there has to be at least one.
* An Activity has at least one VD associated with.
* Activity count is in {1, VD count}.
* In our simple case: there can only be ever one VD displayed in full
screen at the same time.
* For every physical screen there must be at every point in time in
each Activity exactly one active VD covering it (in our special case
of full screen meaning stretched over all physical screens this is
obviously fulfilled).

-----------------------------
KWin/KWayland implementation:
-----------------------------
General:
* Only knows about VDs. Has a list of all of them.
* Broadcasts the current VD list on change (and on bind through
client) to clients.

Switching:
* KWin switches the active VD, i.e. the VD currently displayed full screen.
* KWin gets told by workspace which VD it should switch to or via
Keyboard shortcut and/or effects internally.
* Broadcasts the currently active VD on switch/bind.

Partitioning:
* VD objects have an int or string identifier <partition>, that is set
by workspace to indicate which Activities the VDs are associated with.
* VDs, whose identifier has not yet been set, are associated with a
default Activity.
* An identifier change of a VD is broadcasted to all clients, which
bound the VD interface.

---------------------------------
kactivitymanagerd implementation:
---------------------------------
* Listens for VD and active VD changes.
* Sets the VD identifiers in KWin.
* A switch of the active VD between VDs with different identifiers is
interpreted as an Activity switch.
* Initiates Activity switches by sending a request to change active VD
to one from the other Activity (this could be proxied by
libtaksmanager).

------------------------------
libtaskmanager implementation:
------------------------------
* Listens for VD, active VD and VD identifier changes.
* Associates internally VDs with Activities.
* Can tell KWin which VD to activate.

-----------------
User interaction:
-----------------
Like before, ui improvemenents still make sense though (separate proposal).


More information about the Plasma-devel mailing list