plugins/fallapart: Blacklist spectacle

Spectacle needs to be blacklisted in order to stay out of its own
screenshots.

BUG: 473565
This commit is contained in:
Noah Davis 2023-11-03 14:50:04 -04:00 committed by Vlad Zahorodnii
parent c711997d31
commit ea75c094a9

View file

@ -15,6 +15,12 @@
Q_LOGGING_CATEGORY(KWIN_FALLAPART, "kwin_effect_fallapart", QtWarningMsg)
static const QSet<QString> s_blacklist{
// Spectacle needs to be blacklisted in order to stay out of its own screenshots.
QStringLiteral("spectacle spectacle"), // x11
QStringLiteral("spectacle org.kde.spectacle"), // wayland
};
namespace KWin
{
@ -170,6 +176,9 @@ void FallApartEffect::slotWindowClosed(EffectWindow *c)
if (!c->isVisible()) {
return;
}
if (s_blacklist.contains(c->windowClass())) {
return;
}
const void *e = c->data(WindowClosedGrabRole).value<void *>();
if (e && e != this) {
return;