- Makes it work on Wayland. Depends on D13745.
- Cleans up includes and linkage.
- Fixes some pre-existing bugs like cached actions not updating to changed desktop names.
This codes doesn't take into account when the virtual desktop names change etc. I think it should re-create the actions every time, and not try to be "smart" by only changing the ones that are "superfluous" or "missing" as the names and order inbetween could have changed
In the other patch VirtualDesktopInfo has a shared d ptr across all instances.
There's no point making VirtualDesktopInfo shared when it internally does it itself anyway. You save practically nothing.
Use of the & is weird.
I /think/ this is wrong. Not 100% sure.
We used to want a number wrapped between 1 and numDesktops.
is probably more understandable as
In the new code as we have the IDs in a lookup table so we want our final number to be between 0 and numDesktops-1
Therefore should this be
(same for perform previous)
There's a bigger question.
What if you have 5 desktops, and you delete desktop 2?
We don't want the action for desktop 5 to be the one that's removed.
This either needs better change tracking or to just rebuild the list every time.
Addressing other review comments: