romangg added a comment.
In D12820#263516 <https://phabricator.kde.org/D12820#263516>, @mart wrote: > but then... how to manage collisions? allowing to set the same row/column to different desktops and make kwin responsibility of this not happening? For a layout change the compositor would give KWayland a complete matrix of all virtual desktops indicating their new positions. So KWin would need to make sure that: - every cell in the matrix only has one VD object referenced (this is per definition if the matrix is `QVector<QVector <VirtualDesktopInterface*>>` ), - the matrix contains all available VDs. The compositor would calculate the new matrix internally (it knows about all available VDs and their current positions through KWayland) and then call: 1. `PlasmaVirtualDesktopManagementInterface::layout(QVector<QVector <VirtualDesktopInterface*>> matrix)` containing all VDs, 2. `sendDone()`. On the other side when the compositor wants to create a new VD, it would call: 1. `PlasmaVirtualDesktopManagementInterface::createDesktop()`, 2. `PlasmaVirtualDesktopManagementInterface::layout(QVector<QVector <VirtualDesktopInterface*>> matrix)` containing all VDs including the new one, 3. `sendDone()`. REPOSITORY R127 KWayland REVISION DETAIL https://phabricator.kde.org/D12820 To: mart, #kwin, #plasma, graesslin, hein Cc: bshah, romangg, kde-frameworks-devel, michaelh, ngraham, bruns