Skip to content

wayland: Fix crash when all outputs are disconnected

Vlad Zahorodnii requested to merge work/screens-crash into master

If all outputs have been disconnected, the screensQueried() signal won't be emitted and Screens::count() and Screens::size() won't be updated.

The signal is not emitted to ensure that kwin is initialized properly when there are no outputs.

Unfortunately, this breaks repaint scheduling code as it doesn't take into account that the Screens class may lie in rare cases.

The drm backend should probably create a placeholder screen in case all physical outputs have been disconnected, but in meanwhile, let's work around this issue by porting the scene to the output api in the Platform.

Merge request reports