This reverts commit 30d2489930.
The test results we got indicate that on NVIDIA the problems with the
threaded rendering loop do not exist and at the same time the rendering
result improves a lot. As Qt still disables the threaded rendering loop
for the problematic drivers, it's better to not force the basic rendering
loop.
Rename removeDesktop -> removeScreen
Embrace removeScreen as the procedure to disable a screen.
Don't delay destruction of the panels either, the screen could have been
deleted by then.
::shiftViews seemed like a good idea, but it clearly was not. I promise I
was not on drugs when I decided to use it.
Instead, take a recursive alternative, like we did with insertScreen that
will take care about panels and views.
Don't request geometry of disabled outputs.
Set a random screen to a desktop view before destroying it, otherwise it
goes mental.
Fix assert
Improve debug output
We already used to follow it, but we didn't control most use cases.
Now we'll track the position and geometry changes to make sure that when
they change, redundant outputs can stop being redundant.
Workaround a lack of API from Qt where it will decide to move the panels
around without us being able to control it.
This patch overrides the QWindow::screenDestroyed slot to be able to decide
where to move the Panel or whether it needs to be removed. This is
considered a workaround and should be removed once the new API is in and
released.
See also: https://codereview.qt-project.org/#/c/88351/
BUG: 335710
If there are no Shaders Plasma doesn't work. If we detect this we show
a warning (without GL) and exit.
This doesn't really work as Qt has a bug which doesn't allow to detect
whether Shaders are supported and the exit just doesn't work.
REVIEW: 118812
if we will not set it panel geometry will end up being wrong and hence availableScreenRect
This fixes plasmoids and icons being disappeared when adding panels.
BUG: 336376
REVIEW: 118847
This way, we don't need to have everything being repainted when geometries
change while constructing the panel.
Also don't connect to screen changed until everything is initialized and
the panel is displayed.
To set the sizes, we use the thickness and length properties, those will
also trigger the position timer.
This reduces quite a bit the amount of random changes happening when
initializing and when moving the panel around