When trying to compile the new Multiple Screens feature released yesterday I got this error on KDE neon:
```bash
[ 83%] Building CXX object app/CMakeFiles/latte-dock.dir/lattedockadaptor.cpp.o
[ 84%] Linking CXX executable ../bin/latte-dock
/usr/bin/ld: CMakeFiles/latte-dock.dir/view/clonedview.cpp.o: in function `Latte::ClonedView::translateToClonesOrder(QList<int> const&)':
clonedview.cpp:(.text+0x1aaa): undefined reference to `Latte::ClonedView::ERRORAPPLETID'
collect2: error: ld returned 1 exit status
make[2]: *** [app/CMakeFiles/latte-dock.dir/build.make:2270: bin/latte-dock] Error 1
make[1]: *** [CMakeFiles/Makefile2:1806: app/CMakeFiles/latte-dock.dir/all] Error 2
make: *** [Makefile:146: all] Error 2
```
After some research I found this StackOverflow answer:
https://stackoverflow.com/a/3026148
Which referenced this FAQ by Bjarne Stroustrup:
https://www.stroustrup.com/bs_faq2.html#in-class
In summary, if a `static const` is initialized in a class, and later is used as a reference in an implementation file, it should also be declared inside the implementation file. The initialization can live only inside the class.
Maybe the compiler used by @mvourlakos has an optimization to overcome such construct.
In my case by adding these two lines I could compile it on KDE neon (after fixing the first error, compilation failed on a second spot).
--This is a HUGE FEATURE and so important for multi-screens
users. It is introduced as one single commit because it
reimplements plenty of infrastructure changes and it will
be easier to identify newly introduced bugs.
--Users can now choose for their docks and panels to belong
at various screen groups. The first two screen groups introduced
are AllScreens and AllSecondayScreens. In the future it might
be possible to provide CustomScreensGroup that the user will
be able to define specific screens in which a dock or panel
should be always present.
--Current solution specifies an Original dock or panel and clones/copies
itself automatically to other screens. So docks and panels in other screens
are just real docks and panels that reference themselves to original
docks and panels.
--Clones are destroyed during layout startup and are automaticaly
recreated. It is suggested to export your layouts through the
official Layouts Editor in order to share them because in that case
clones are not included in the new generated layout file. If in any
case you do not this and you share your layout with any previous
versions then your clones will just appear as separate docks and
panels that belong to specific screens.
--Automatic syncing was introduced in order to keep up-to-date
the configuration of Original docks and panels with their referenced
Clones.
--Automatic syncing currently works for all docks and panels settings,
for all normal applets configurations and for all subcontaiments
configuration such as systrays.
--Automatic syncing does not work for applets inside subcontainments
such as Group Plasmoid. In such case it is suggested to configure
your applets inside your Group Plasmoid in the original dock or panel
and afterwards to trigger a recreation for the relevant clones
--Manual recreation of clones is easily possible by just choosing
the dock or panel to be OnPrimary or OnSpecificScreen and rechoosing
afterwards the AllScreensGroup or AllSecondaryScreensGroup
--this way the user can choose to use a much
greater parabolic effect that will influence five
or seven of its neighbours instead of just three.
The new option can be found at Latte Global Preferences.
--some improvements of 0.10.5 broke the windows tracking
initialization. This is a fix in order for windows tracking
to be enabled/disabled properly per dock/panel during
startup phase.
--after recreating a view, launchers group is now
assigned again correctly. As it appears the problem
was that Host.MyView ability was sending an isReady
signal that was not accurate enough.
--This new approach paints all docks and panels during
starup offscreen. This way especially under x11 not a lot of
visual glitches are appearing all over the place.
After startup time has ended docks and panels are
moved at their original and valid placement and slide in
animations are triggered.
--this way mouse clicks correspond much better
in how they should behave. For example right
clicks do not forward always the events to the
desktop during sliding.
--the following options are exposed to indicators
in order to use them to their preference:
----iconTransformOrigin
----iconOpacity
----iconRotation
----iconScale
--when an applet is not identified as expandable
but on the other hand has activated the flag
activationTogglesExpanded then for those
applets the mouse wheel option should also
trigger an activation event
--consider the panel background roundness and position
positions only related to that roundness. This way the
plasma style popups that feel part of the panel background
are positioned properly always and they do not touch
in empty areas.
--introducing in Indicators API a new option to
specify the indicator preference for the distance
between the indicator and panel background roundness.
By altering the option the indicator can get into
the panel background roundness.
BUG:442675
--always use blur timer in order to update blurred
area, this way subcalculations between timer triggering
are not taken into account. This way user experience
with blur and parabolic effect are improved.
--the new approach is not using timers but actual
events from View in order to identify when the
view is fully shown and when their popup is actual
visible. This way popup showing and view slide-in
is always synchronized properly
BUG:425078
--ViewPart:VisibilityManager is sending events
to show or hide but it can not validate the view
visual state meaning is hidden, sliding in/out, blocked
etc. That role is taken from Containment::VisibilityManager
that accepts that signals and in case the state are
requesting is already provided then in such case
these signals are ignored.
--This way myView flags for inSlidingIn/Out/PartiallyShown/FullyShown
etc are providing valid values in some previous
problematic scenarios
--This fix solves the issue that parabolic effect with Tasks Previews
it was not too responsive but it had many glitches
--improve a lot how applets are positioned in
different alignments and more specific take into
consideration the background roundness and the
items specified length margin in order to provide
always the most consistent look for the user
--at the same time improve a lot background length
calculations and various alignments published
layout geometry in order to correspond much
better to real visible estate
--the new code is more consistent and calculates the
appropriate place to add an applet much better
based on the distance that dropped applet is
having with each layout.
--this way a layout designer can force to its users
the desired color palette for each dock and panel.
BeCareful: designers should be very careful with this
because they take responsibility to disable latte auto-coloring
at per-applet basis in order for chromatic applets to NOT
be autocolored from latte because they already provide enough
contrast.
BUG:435714