plugins/fadingpopups: don't block direct scanout
The effect only modifies the opacity of individual windows that WorkspaceScene::scanoutCandidate will reject anyways, so there's no reason for it to block direct scanout. Once a more proper solution for blocking direct scanout on individual items is in place, this can be removed again BUG: 487780
This commit is contained in:
parent
6d7a9a6416
commit
de8bd8f126
4 changed files with 13 additions and 4 deletions
|
@ -71,7 +71,7 @@ void DontCrashCancelAnimationFromAnimationEndedTest::cleanup()
|
||||||
void DontCrashCancelAnimationFromAnimationEndedTest::testScript()
|
void DontCrashCancelAnimationFromAnimationEndedTest::testScript()
|
||||||
{
|
{
|
||||||
// load a scripted effect which deletes animation data
|
// load a scripted effect which deletes animation data
|
||||||
ScriptedEffect *effect = ScriptedEffect::create(QStringLiteral("crashy"), QFINDTESTDATA("data/anim-data-delete-effect/effect.js"), 10, QString());
|
ScriptedEffect *effect = ScriptedEffect::create(QStringLiteral("crashy"), QFINDTESTDATA("data/anim-data-delete-effect/effect.js"), 10, QString(), true);
|
||||||
QVERIFY(effect);
|
QVERIFY(effect);
|
||||||
|
|
||||||
const auto children = effects->children();
|
const auto children = effects->children();
|
||||||
|
|
|
@ -103,5 +103,6 @@
|
||||||
"Name[zh_TW]": "淡化彈出視窗"
|
"Name[zh_TW]": "淡化彈出視窗"
|
||||||
},
|
},
|
||||||
"X-KDE-Ordering": 60,
|
"X-KDE-Ordering": 60,
|
||||||
|
"X-KDE-BlocksDirectScanout": false,
|
||||||
"X-Plasma-API": "javascript"
|
"X-Plasma-API": "javascript"
|
||||||
}
|
}
|
||||||
|
|
|
@ -165,10 +165,10 @@ ScriptedEffect *ScriptedEffect::create(const KPluginMetaData &effect)
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
return ScriptedEffect::create(name, scriptFile, effect.value(QStringLiteral("X-KDE-Ordering"), 0), effect.value(QStringLiteral("X-KWin-Exclusive-Category")));
|
return ScriptedEffect::create(name, scriptFile, effect.value(QStringLiteral("X-KDE-Ordering"), 0), effect.value(QStringLiteral("X-KWin-Exclusive-Category")), effect.value(QStringLiteral("X-KDE-BlocksDirectScanout"), true));
|
||||||
}
|
}
|
||||||
|
|
||||||
ScriptedEffect *ScriptedEffect::create(const QString &effectName, const QString &pathToScript, int chainPosition, const QString &exclusiveCategory)
|
ScriptedEffect *ScriptedEffect::create(const QString &effectName, const QString &pathToScript, int chainPosition, const QString &exclusiveCategory, bool blocksDirectScanout)
|
||||||
{
|
{
|
||||||
ScriptedEffect *effect = new ScriptedEffect();
|
ScriptedEffect *effect = new ScriptedEffect();
|
||||||
effect->m_exclusiveCategory = exclusiveCategory;
|
effect->m_exclusiveCategory = exclusiveCategory;
|
||||||
|
@ -177,6 +177,7 @@ ScriptedEffect *ScriptedEffect::create(const QString &effectName, const QString
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
effect->m_chainPosition = chainPosition;
|
effect->m_chainPosition = chainPosition;
|
||||||
|
effect->m_blocksDirectScanout = blocksDirectScanout;
|
||||||
|
|
||||||
return effect;
|
return effect;
|
||||||
}
|
}
|
||||||
|
@ -306,6 +307,11 @@ bool ScriptedEffect::isActiveFullScreenEffect() const
|
||||||
return effects->activeFullScreenEffect() == this;
|
return effects->activeFullScreenEffect() == this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool ScriptedEffect::blocksDirectScanout() const
|
||||||
|
{
|
||||||
|
return m_blocksDirectScanout;
|
||||||
|
}
|
||||||
|
|
||||||
QList<int> ScriptedEffect::touchEdgesForAction(const QString &action) const
|
QList<int> ScriptedEffect::touchEdgesForAction(const QString &action) const
|
||||||
{
|
{
|
||||||
QList<int> ret;
|
QList<int> ret;
|
||||||
|
|
|
@ -80,7 +80,7 @@ public:
|
||||||
}
|
}
|
||||||
QString activeConfig() const;
|
QString activeConfig() const;
|
||||||
void setActiveConfig(const QString &name);
|
void setActiveConfig(const QString &name);
|
||||||
static ScriptedEffect *create(const QString &effectName, const QString &pathToScript, int chainPosition, const QString &exclusiveCategory);
|
static ScriptedEffect *create(const QString &effectName, const QString &pathToScript, int chainPosition, const QString &exclusiveCategory, bool blocksDirectScanout);
|
||||||
static ScriptedEffect *create(const KPluginMetaData &effect);
|
static ScriptedEffect *create(const KPluginMetaData &effect);
|
||||||
static bool supported();
|
static bool supported();
|
||||||
~ScriptedEffect() override;
|
~ScriptedEffect() override;
|
||||||
|
@ -182,6 +182,7 @@ public:
|
||||||
|
|
||||||
QString pluginId() const;
|
QString pluginId() const;
|
||||||
bool isActiveFullScreenEffect() const;
|
bool isActiveFullScreenEffect() const;
|
||||||
|
bool blocksDirectScanout() const override;
|
||||||
|
|
||||||
public Q_SLOTS:
|
public Q_SLOTS:
|
||||||
bool borderActivated(ElectricBorder border) override;
|
bool borderActivated(ElectricBorder border) override;
|
||||||
|
@ -222,5 +223,6 @@ private:
|
||||||
Effect *m_activeFullScreenEffect = nullptr;
|
Effect *m_activeFullScreenEffect = nullptr;
|
||||||
std::map<uint, std::unique_ptr<GLShader>> m_shaders;
|
std::map<uint, std::unique_ptr<GLShader>> m_shaders;
|
||||||
uint m_nextShaderId{1u};
|
uint m_nextShaderId{1u};
|
||||||
|
bool m_blocksDirectScanout = true;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue