This fixes "Change Wallpaper..." in System Settings unable to open the
config dialog when the current activity is not the default one.
BUG: 452561
(cherry picked from commit f994e1301f)
It caused issues on the Plasma Mobile where it throws the GL error in
the console and does not render panel windows at all. Till we can figure
this issue out, revert it to restore functionality
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
On multiscreen (seems to happen only on X11 so far) when screen are
added and moved, sometimes the panel gets moved by the window manager
ending up out of screen boundaries, leaving a screen without panel
a common scenario is:
laptop with external screen connected, panel on internal screen,
close the lid, everything gets moved to the external screen,
the panel will stay out of screen boundaries, but the panel struts are correct
CCBUG:438114
Since the DesktopView has "transparent" clear color, it will allocate a
buffer with an alpha channel and QtWayland won't be able to set an
opaque region. This change sets the clear color of DesktopView to "black"
so overdraw can be fixed in kwin and to improve render performance on
wayland.
Cherry picked from commit 745e2c0828,
except that it also adds a platform check. Some people reported that
setColor(Qt::black) in DesktopView breaks panel translucency on X11.
A few of plasma developers have tried to reproduce that issue, but
couldn't. It needs more investigation. In meanwhile, let's set clear
color to black only on Wayland.
if we do immediately setPrimaryOutputName, the name is still :0.0
because the app didn't have time to react yet (since here we are in the event filter,
we are just before that by definition) so the output name can still be wrong.
when we go from no outputs to one, at this point the name of the one QScreen
instane is still wrong :0.0 which will be renamed right after.
BUG:447936
when we disconnect all real outputs, we only have a single fake QScreen in this case consider corona to not have screens and remove all desktops and panels. makes easier for a coherent reconstruction when real screens get back and won't save in screen mapping the :0.0 connector name
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.
This timer is used to delay the shell state being refreshed and when a new screen is available.
It seems unnecessary to have such a long delay, once screen geometry are stable to work with.
A placeholder screen is created by Qt when no real screens exist. We
don't want to create panels and containments for those, it is a whole
world of pain.
Plasma has a hook to ignore some screens which is extended with this
check.
CCBUG: 419492