Revert "[Plasma Dialog] Call window effects only if visible"

Apparently causes background contrast to not work on startup, let's just revert this
and figure out a proper solution later.

BUG: 389352

This reverts commit f3cd5d55fa.
This commit is contained in:
Kai Uwe Broulik 2018-01-26 20:33:09 +01:00
parent f31e7860d9
commit f6de326fdf

View File

@ -231,10 +231,8 @@ void DialogPrivate::updateTheme()
{ {
if (backgroundHints == Dialog::NoBackground) { if (backgroundHints == Dialog::NoBackground) {
frameSvgItem->setImagePath(QString()); frameSvgItem->setImagePath(QString());
if (q->isVisible()) { KWindowEffects::enableBlurBehind(q->winId(), false);
KWindowEffects::enableBlurBehind(q->winId(), false); KWindowEffects::enableBackgroundContrast(q->winId(), false);
KWindowEffects::enableBackgroundContrast(q->winId(), false);
}
q->setMask(QRegion()); q->setMask(QRegion());
DialogShadows::self()->removeWindow(q); DialogShadows::self()->removeWindow(q);
} else { } else {
@ -244,15 +242,13 @@ void DialogPrivate::updateTheme()
frameSvgItem->setImagePath(QStringLiteral("dialogs/background")); frameSvgItem->setImagePath(QStringLiteral("dialogs/background"));
} }
if (q->isVisible()) { KWindowEffects::enableBlurBehind(q->winId(), true, frameSvgItem->frameSvg()->mask());
KWindowEffects::enableBlurBehind(q->winId(), true, frameSvgItem->frameSvg()->mask());
KWindowEffects::enableBackgroundContrast(q->winId(), theme.backgroundContrastEnabled(), KWindowEffects::enableBackgroundContrast(q->winId(), theme.backgroundContrastEnabled(),
theme.backgroundContrast(), theme.backgroundContrast(),
theme.backgroundIntensity(), theme.backgroundIntensity(),
theme.backgroundSaturation(), theme.backgroundSaturation(),
frameSvgItem->frameSvg()->mask()); frameSvgItem->frameSvg()->mask());
}
if (KWindowSystem::compositingActive()) { if (KWindowSystem::compositingActive()) {
if (hasMask) { if (hasMask) {