[Compositor] Improve debug output for compositing suspended

Map the flags to a user readable name.

BUG: 334558
REVIEW: 118140
This commit is contained in:
Martin Gräßlin 2014-05-15 09:19:21 +02:00
parent c6da593dc9
commit f70951ef76

View file

@ -143,7 +143,17 @@ void Compositor::setup()
if (hasScene()) if (hasScene())
return; return;
if (m_suspended) { if (m_suspended) {
qDebug() << "Compositing is suspended, reason:" << m_suspended; QStringList reasons;
if (m_suspended & UserSuspend) {
reasons << QStringLiteral("Disabled by User");
}
if (m_suspended & BlockRuleSuspend) {
reasons << QStringLiteral("Disabled by Window");
}
if (m_suspended & ScriptSuspend) {
reasons << QStringLiteral("Disabled by Script");
}
qDebug() << "Compositing is suspended, reason:" << reasons;
return; return;
} else if (!CompositingPrefs::compositingPossible()) { } else if (!CompositingPrefs::compositingPossible()) {
qCritical() << "Compositing is not possible"; qCritical() << "Compositing is not possible";