Currently we are very inconsistent with how we handle our various X11 dependencies.
Some places check whether specific sub-libraries are found and disable parts of the code accordingly.
Sometimes this is controlled by whether X11 is found at all, sometimes it depends on the sublibrary being present.
Some of this is obviously broken, e.g. in one like we check whether X11 is there and then use it unconditionally a few lines down.
Instead of the current system of optional deps and deps being conditional on other deps I propose that we introduce an explicit build option that controls the X11 support.
If on (the default) then all X11 libs are required.
If off then no X11 libs are searched for. Currently this results in a broken build since some places use X11 stuff unconditionally, but it gives us an easier way to test and fix those cases.
CMake's FindX11 package reports that X11 was found even if not all libraries
are present. It also doesn't support proper components. This causes issues on
distros that split X11 headers into a myriad of small packages, for instance
Debian: some, but not all, components might be found.
Explicitly check that every X11 component used by Plasma was found by FindX11.
KInit will be gone in KF6. However, we still need to update a KF5 KLauncher
for the time being, for KF5-based apps running in a Plasma 6 session. All
we need for that is a copy of the D-Bus interface definition though.
This allows me to build without the Qalculate dependency which is only
used for the calculator runner. Not having Qalculate installed will still
be an error unless the user explicitly passes
`-DCMAKE_DISABLE_FIND_PACKAGE_Qalculate=True`.
index desktop views by qscreen instead of id, making ScreenPool
the single source of truth for the mapping between screen names
and ids. This is less error prone and easier to consistency check
(if view->screenToFollow() is ever different to its has key it will
assert)
The whole logic of screen management is moved to ScreenPool.
ShellCorona will have to never call QGuiApp->screens, but only trust what ScreenPool it's telling it
Also adds an autotests on screenpool which makes a fake wayland server which sends screen added/removed/changed events
If libqalculate is not present on the system, calculator runner falls
back to using QJSEngine, which results in significantly reduced
precision. Make calculator runner unconditionally dependent on
Qalculate and remove conditional fallback code to QJSEngine.
BUG: 433730
Refactors XRandr support together with the new Wayland code into a
PrimaryOutputWatcher class.
For X11 it listens to xcb events.
For Wayland it uses the kde_output_management_v2 protocols.
Currently they live in the Breeze repo which is a bit weird and random
and complicates the process of updating the default wallpaper. Let's
centralize them all to live here.