Introduce a VirtualDesktop class
ClosedPublic

Authored by graesslin on Nov 7 2016, 10:03 AM.

Details

Summary

This is the first change for a larger virtual desktop refactoring. So
far for X11 virtual desktops are just a number. The current virtual
desktop is a number between 1 and the count of virtual desktops.

Similar a Toplevel is on the virtual desktop by setting the number as a
property.

In the long run we want to change that and allow to have windows on
multiple virtual desktops and also support virtual desktops on Wayland.
On Wayland a virtual desktop will be an object.

As a first step a VirtualDesktop class is introduced which currently is
just a glorifed wrapper around the x11 desktop number. The
VirtualDesktopManager now holds a pointer to the current desktop and the
available desktops are a QVector of VirtualDesktops. The implicit
mapping to counting of desktops is removed. Though the internal API is
still completely count based. In follow up changes this will be turned
into being more and more VirtualDesktop based. At least the Core should
be completely transferred to be VirtualDesktop based instead of uint
based.

Test Plan

virtual desktop auto test still passes (test coverage 97 % line,
83 % conditionals)

Diff Detail

Repository
R108 KWin
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
graesslin updated this revision to Diff 7955.Nov 7 2016, 10:03 AM
graesslin retitled this revision from to Introduce a VirtualDesktop class.
graesslin updated this object.
graesslin edited the test plan for this revision. (Show Details)
graesslin added reviewers: KWin, Plasma on Wayland.
Restricted Application added projects: Plasma on Wayland, KWin. · View Herald TranscriptNov 7 2016, 10:03 AM
Restricted Application added subscribers: kwin, plasma-devel. · View Herald Transcript
hein requested changes to this revision.Nov 7 2016, 10:10 AM
hein added a reviewer: hein.
hein added a subscriber: hein.
hein added inline comments.
virtualdesktops.h
352

Missing doc for previousCurrent

This revision now requires changes to proceed.Nov 7 2016, 10:10 AM
graesslin marked an inline comment as done.Nov 7 2016, 3:28 PM
graesslin updated this revision to Diff 7986.Nov 7 2016, 3:28 PM
graesslin edited edge metadata.

Update docs

hein accepted this revision.Nov 8 2016, 9:06 AM
hein edited edge metadata.
This revision is now accepted and ready to land.Nov 8 2016, 9:06 AM
This revision was automatically updated to reflect the committed changes.