plugins/fallapart: Blacklist spectacle

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

BUG: 473565
master
Noah Davis 11 months ago committed by Vlad Zahorodnii
parent c711997d31
commit ea75c094a9

@ -15,6 +15,12 @@
Q_LOGGING_CATEGORY(KWIN_FALLAPART, "kwin_effect_fallapart", QtWarningMsg) 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 namespace KWin
{ {
@ -170,6 +176,9 @@ void FallApartEffect::slotWindowClosed(EffectWindow *c)
if (!c->isVisible()) { if (!c->isVisible()) {
return; return;
} }
if (s_blacklist.contains(c->windowClass())) {
return;
}
const void *e = c->data(WindowClosedGrabRole).value<void *>(); const void *e = c->data(WindowClosedGrabRole).value<void *>();
if (e && e != this) { if (e && e != this) {
return; return;

Loading…
Cancel
Save