Fix initialization of ColorManager

There might be some outputs during the initialization of the color
manager, we need to handle this case.
This commit is contained in:
Vlad Zahorodnii 2021-01-30 17:10:40 +02:00
parent 343338049c
commit aad767f91f

View file

@ -27,6 +27,11 @@ ColorManager::ColorManager(QObject *parent)
: QObject(parent)
, d(new ColorManagerPrivate)
{
const QVector<AbstractOutput *> outputs = kwinApp()->platform()->enabledOutputs();
for (AbstractOutput *output : outputs) {
handleOutputEnabled(output);
}
connect(kwinApp()->platform(), &Platform::outputEnabled,
this, &ColorManager::handleOutputEnabled);
connect(kwinApp()->platform(), &Platform::outputDisabled,