Skip to content

ScreenPool: Ensure that primaryScreenChanged is emitted always after screenAdded

On Wayland, the primary screen notification and QGuiApplication::screenAdded signals are desync. The primary output watcher addresses that by emitting its primaryOutputNameChanged() signal when the corresponding QGuiApplication::screenAdded() signal is emitted.

However, since the primary output watcher processes the screenAdded signal before ScreenPool, it can emit the ScreenPool::primaryScreenChanged signal before ScreenPool::screenAdded signal that can confuse the ShellCorona.

Merge request reports