Commit 7dd3aa10 authored by Oxalica --'s avatar Oxalica -- Committed by Nate Graham
Browse files

wayland: don't create DesktopView for placeholder screen

This fix crash when turn off and on the only primary display.

BUG: 438839
BUG: 444801


(cherry picked from commit d39592c3)
parent ed18868c
......@@ -713,7 +713,7 @@ void ShellCorona::primaryOutputChanged()
QScreen *oldPrimary = m_desktopViewforId.value(0)->screen();
QScreen *newPrimary = qGuiApp->primaryScreen();
if (!newPrimary || newPrimary == oldPrimary) {
if (!newPrimary || newPrimary == oldPrimary || newPrimary->geometry().isNull()) {
return;
}
......@@ -1180,6 +1180,11 @@ void ShellCorona::reconsiderOutputs()
void ShellCorona::addOutput(QScreen *screen)
{
Q_ASSERT(screen);
if (screen->geometry().isNull()) {
return;
}
connect(screen, &QScreen::geometryChanged, &m_reconsiderOutputsTimer, static_cast<void (QTimer::*)()>(&QTimer::start), Qt::UniqueConnection);
if (isOutputRedundant(screen)) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment