backends/drm: make the placeholder screen as big as the last screen

The fixed size of 1080p makes windows change their size and place. To
prevent that from happening, make the placeholder screen the same size
as the last disconnected screen.
This is not a bullet proof solution, only a fast one. Ideally KWin
should remember the window layout on a given monitor setup and restore
it when reconnected.

BUG: 447419
FIXED-IN: 5.24
master
Xaver Hugl 3 years ago
parent bc3d80db2a
commit 5a6f1e42c1

@ -501,7 +501,7 @@ void DrmBackend::enableOutput(DrmAbstractOutput *output, bool enable)
}
if (m_enabledOutputs.count() == 1 && !kwinApp()->isTerminating()) {
qCDebug(KWIN_DRM) << "adding placeholder output";
m_placeHolderOutput = primaryGpu()->createVirtualOutput({}, {1920, 1080}, 1, DrmGpu::Placeholder);
m_placeHolderOutput = primaryGpu()->createVirtualOutput({}, m_enabledOutputs.constFirst()->pixelSize(), 1, DrmGpu::Placeholder);
// placeholder doesn't actually need to render anything
m_placeHolderOutput->renderLoop()->inhibit();
}

Loading…
Cancel
Save