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) {
frameSvgItem->setImagePath(QString());
if (q->isVisible()) {
KWindowEffects::enableBlurBehind(q->winId(), false);
KWindowEffects::enableBackgroundContrast(q->winId(), false);
}
q->setMask(QRegion());
DialogShadows::self()->removeWindow(q);
} else {
@ -244,7 +242,6 @@ void DialogPrivate::updateTheme()
frameSvgItem->setImagePath(QStringLiteral("dialogs/background"));
}
if (q->isVisible()) {
KWindowEffects::enableBlurBehind(q->winId(), true, frameSvgItem->frameSvg()->mask());
KWindowEffects::enableBackgroundContrast(q->winId(), theme.backgroundContrastEnabled(),
@ -252,7 +249,6 @@ void DialogPrivate::updateTheme()
theme.backgroundIntensity(),
theme.backgroundSaturation(),
frameSvgItem->frameSvg()->mask());
}
if (KWindowSystem::compositingActive()) {
if (hasMask) {